WriteTo method bug fix. WriteTo method should use TextWriter from parameter rather than from context.
Merge pull request #189 from kirylandruski/master

WriteTo method bug fix.