[qfp] Refact function stop and replay