Implemented global catch for unhandled exceptions.
Implemented additional logging. Fixed bug in ProxyConnection - process was terminated if proxy failed to connect to outbound socket.