There are only three different return values and we will only abort early if cancel gets hit but not ok or replace. So a simple check for returnCancel would have been enough. But as you say, you want to rewrite those bits.