#1109 Added ability to specify outfile