changed to stdin for filenames