added error handling for upload, comment some printf() in transfer_parser