Check network connection on startup