Check network connection