Better upload error handling