HW5 Solution delete useless infile.close()