Use locked StringBuilder for data output