Fixing bug on download of binary files from s3