adding flag to check if app was already started