Fine tuning of some error logging