in reply to Execute function before exit of do() block

I do not know what your helper script is doing, but if the two scripts are independent, maybe you could use the system command to launch your second script and check the exit status of the child.