bthread.js: log errors.