clean up of error logging