Added failover protection into application