consolidate error logging