exit process when app is finished