Added newtwork connection check