Fix. Anchor thread of zmq writer to do properly cleanup