write output to stdout