Changed console.err to console.error