Fix upload_file script