Check fwrite for number of bytes written; if false or 0 throw exception.
Updated composer package name
Merge branch 'feature/handle-disconnected'

* feature/handle-disconnected:
  Check fwrite for number of bytes written; if false or 0 throw exception.