changed showError to console.error