tweak error logging