Added a bunch of error messages to give useful feedback for error conditions on various system calls.  Program sometimes hangs on read() call in save_response.  I know what the problem is and will fix it shortly.