Use module.exports.logError instead of this