Added internet connectivity check with background thread which checks for connection every 10 seconds.