working prototype of file creation