Logging the internal state before the assertion makes it easier to figure out why the assertion failed in the first place.