added --timeout to set ping timeout