Modified writeOut().
Merge origin/master