Bug with file creation