Add exit statement in script