error checking when writing to the client
Merge branch 'master' of https://github.com/shsing2000/junk