Add function to write output to file