Embedded lock in history struct and fixed default --identity key location