Flag based run done