add try block for all connect operations; fixed bug in commander (a stray close connection call)