Returned more correct error when invalid config file is used.
Refactored client class.
Better error message from client with server error