exception logging improved