fix lack of output when reading files from stdin