Pass writers instead of generating strings