Move common ensure execution code into method