fixed read input file bug