I think has more sense to ```register_files_for_cleanup``` before, if the upload has been successful.