Do not fatal immediatly on write error, report to the upper layer.
Merge branch 'master' into portable