Added missing serialize(TextWriter)