worker: add runOutput function