Closed the file, apparently forgot to do that for the checkFile() function.