Log more replay debugging info and make global flags in unit tests easier to change.