fixed input file read issue