closeApp before exit