add loglevel option, catch errors in worker