use curl to check connectivity if present; add timeout to wget