bug fix: handle input file suffix