fix close file problem in parseHexFile