Fix accepting file input, but created a problem accepting STDIN input.