Fixing bug where we weren't closing handles on createFile()