Received with thanks, Mario.
I will come back to commune with this if later I need to.
My script is now working, but I note that this module uses POSIX exits.
Whilst I do not yet understand what exactly the difference is, I am aware it behaves differently.