Added failure recovery mechanism