Exit method to Application