fixed multiple input file bug