Add error logging to console