Add abortMultipartUpload if upload failed.
Better error handling for test