protect the string writer