Use logging library instead of console.log

That sounds like a good idea.