Added fix for logging principal name.