modified main() to accept file at command line