Added exception handling to both server 'connect' commands