Write output to file
Documentation