[logs] use console.error instead of console.log when logging errors