add file generation code to filetransfer