Now checking for valid UTF8.  Now using buffered write for improved write performance.