need to fix file creation