Added connectivity check.