gracefully close zk