No need to do addMessageListener if it's you main class extending from Script
Just add some debug logs to check what codes gets executed and which not.
I'm not sure where the sapling variable is coming from, I asusme you set it in the onLoop? Just load the sapling ad hoc
BUT those are bad habbits, do this instead:
Never use any interaction code in the messageListener, only in the onLoop thread.
You can set a boolean in the onMessage and check that boolean in the onLoop to execute your code and reste the boolean after that