Added failover support.