core/demo.js: optimization in r.log.write callback
core/demo.js: r.log --> log (use a shortcut)