write output to file instead of console