in reply to After system call, scripts is getting terminated
...
on line 42 you have a termination command that ends the script