Replace StringWriter by FormatWriter, add strings to BinaryWriter.