Why "exit - re-open", if simple setting of a flag works just fine?