Added connectivity checking