added error logging to console