Add expect connection error handlings