Added option to ping hosts before conn attempt