added command-line processing to find the input filename