added capability to process a file presented as an argument rather than stdin