Added exit logic