Added connectivity check