Added detection using "sleep", just in case the "ping" command isn't installed and/or in PATH