added exception handling for node connect