Added ability to enter an output file name.