Fixing fwrite error check
Merge branch 'master' of https://github.com/regehr/solid_code_class