improve error log in node.js