some updates to S3 upload