improved print() in worker.js