Handle exception from zookeeper due to delay in master election