Filesystem->createFile code refactoring