Throw errors instead of console.log