Implement graceful exit when zk session expired