Checks connection