add console logging to errors