I have this method that fetches data from s3 and adds it to a file for download. The process is working without error unless I move the download statement outside the for lo