Improve api trace replay consistency checking