fix sync_file in utils