more error trapping and encapsulation of server info discovery