Write output to file output.txt