Bugfix: handling if print queue receives terminate signal before
emptying the queue, and fixing tokens to trigger on exit, every time.