Add ability to write result output to file.