check or propagate return values when writing
Merge pull request #899 from hardening/hardening6

check or propagate return values when writing