)

        # ask 3 times if input is unclear
        for i in range(3):
            proceed = raw_input("Finalize upload? [y/n]: ")
            if proceed in ["y", "Y", "yes", "Yes"]:
                for s3_bucket in s3_bucket_list:
                    # upload an empty DONE file for each sequence
                    params = {
                        "url": MAPILLARY_UPLOAD_URL,
                        "key": s3_bucket,
                        "permission": MAPILLARY_PERMISSION_HASH,
                        "signature": MAPILLARY_SIGNATURE_HASH,
                        "move_files": False
                    }
                    upload_done_file(params)
                    print("Done uploading.")
                break
            elif proceed in ["n", "N", "no", "No"]:
                print(
                    "Aborted. No files were submitted. Try again if you had failures."
                )
                break
            else:
                if i == 2:
                    print(
                        "Aborted. No files were submitted. Try again if you had failures."
                    )
                else:
                    print('Please answer y or n. Try again.')
        print("If all files were marked as successful, everything is fine, just press 'y'.")

        # ask 3 times if input is unclear
        for i in range(3):
            proceed = "y"
            if not auto_done:
                proceed = raw_input("Finalize upload? [y/n]: ")
            if proceed in ["y", "Y", "yes", "Yes"]:
                for s3_bucket in s3_bucket_list:
                    # upload an empty DONE file for each sequence
                    params = {"url": MAPILLARY_UPLOAD_URL,
                              "key": s3_bucket,
                              "permission": MAPILLARY_PERMISSION_HASH,
                              "signature": MAPILLARY_SIGNATURE_HASH,
                              "move_files": False}
                    upload_done_file(params)
                    print("Done uploading.")
                break
            elif proceed in ["n", "N", "no", "No"]:
                print("Aborted. No files were submitted. Try again if you had failures.")
                break
            else:
                if i==2:
                    print("Aborted. No files were submitted. Try again if you had failures.")
                else:
                    print('Please answer y or n. Try again.')

        # store the logs after finalizing
        write_log(lines, path)