Changed download code to use s3 object to file stream