Add datalog for replay