using console.log to report errors