added error handling if there was an upload error, just retries