nit: use console.error() better.