Update: added onWorkerError callback