adding an error check for zmq