improved messagelogging