Update error handling

By no means complete, this code finds a couple places where I/O could
fail with unclear error messages. It removes some error handling
conflation between deserializing and network connectivity, and hopefully
makes environmental issues easier to troubleshoot.
Merge pull request #1 from supercow/error_checking

Update error handling