master: added checking for Internet connection.