write output