Check if internet connection is available

Signed-off-by: Umair Khan <omerjerk@gmail.com>