def success_check(filename):
    """Parse the given log file and check whether the script execution
    was successful or not

    Parameters
    ----------
    filename : str
        Name of the log file to parse

    Returns
    -------
    execution : str
        ``success`` or ``failure``
    """
    with open(filename, 'r') as file_obj:
        all_lines = file_obj.readlines()
    final_line = all_lines[-1]
    if 'complete' in final_line.lower():
        execution = 'success'
    else:
        execution = 'failure'
    return execution