Added TextWriter class