At about your second line of the script, add a line saying
and you'll see the script operations as it progresses through the script. So when you exit your editor, it should show you what the script does next. However as shown, the script does nothing next, it has entered that if-statement and when done with the editor, it will progress to the fi part of the if-statement, and then there's no further script shown.