Fixed the output stream incomplete data by explicitly flushing the OutputStreamWriter
Merge pull request #704 from aantono/master

Fixed the output stream incomplete data by explicitly flushing the OutputStreamWriter