Fixed input file bug when passing in a directory vs a file