logging improved