fix error while reading input file