Issue #174 - use console.error instead of console.log

As discussed in issue #174, we had to log errors in err.log file in our node.js app.
Here’s a pull request which fixes that.