Added code to cover no connection to server, and try to catch most of those exceptions.