add an option for setting the output file