on error write output