Generic failover library