Check return state of write(), otherwise this fails for compilers for unused result.
Merge pull request #126 from BrianAker/master

Check return state of write(), otherwise this fails for compilers for un...