add error checking and error messages
Merge branch 'master' into server-write
fix error in server.c
what hath we wrought upon ourselves