simplified the file generation