def METHOD_NAME(log_file, tasks):
    success_count = 0
    fail_count = 0
    fail_header = False
    f = open(log_file, mode="w+")
    for task in tasks:
        writeOutput(task, f)
        if task.success:
            success_count += 1
        else:
            if not fail_header:
                print("""\