use console.error for errors