turning on error logging