capture error logging