fixed my memory woopsies in closeFile() and deleteFile()