Checking the connection status