Better error handeling on s3 upload