Added an outFile option to write output to a file.