Fixed upload to s3 script issues