added error message
removed console.log