fixed file creation issue