logging, and some entity changes