cleanup some places to use with-string-writer.