Fixed typo.
Added input file processing to main.