modified createFileDownload