actually write output