made Writer.Write safe with defer/recover
made Output.Deliver safe with defer/recover