make emitter more robust to failures
changes to how binary works