exit process when finished