Check for network connection