modify error logging