AppleScript Called by Hazel quit working

I've been using a AppleScript called by Hazel for several years. Purpose is to decipher pdf statements and bills and "intelligently" create a file name.
Recently - within the last 2 weeks, that script has ceased to work correctly. I'm sorry that I cannot articulate known system software changes. I'm running Big Sur 11.2.1 on a 2015 iMac, but I don't recall when that software update occurred and I haven't tracked Hazel updates. I do try to keep all software current.
The script executes as it is supposed to in standalone test.
However when called by Hazel no filename is (apparently) generated by the script (I do not know that certainly) and the 3 actions that follow the Run AppleScript action do not appear to execute.
I know that Hazel calls the script - I can see the beginning of the script opening the pdf using PDFPen. But then it ends instead of generating a filename. The Hazel log shows the rule matched, followed by "Done processing folder Action".
My fundamental question is: can you help me find a way to test this? I can single-cycle thru the code (Script Debugger) in stand alone, but that doesn't work when invoked by Hazel. I need to be able to learn where the code fails when called by Hazel.
Sorry, but I don't understand how to attach a screenshot to show you the rules.
Recently - within the last 2 weeks, that script has ceased to work correctly. I'm sorry that I cannot articulate known system software changes. I'm running Big Sur 11.2.1 on a 2015 iMac, but I don't recall when that software update occurred and I haven't tracked Hazel updates. I do try to keep all software current.
The script executes as it is supposed to in standalone test.
However when called by Hazel no filename is (apparently) generated by the script (I do not know that certainly) and the 3 actions that follow the Run AppleScript action do not appear to execute.
I know that Hazel calls the script - I can see the beginning of the script opening the pdf using PDFPen. But then it ends instead of generating a filename. The Hazel log shows the rule matched, followed by "Done processing folder Action".
My fundamental question is: can you help me find a way to test this? I can single-cycle thru the code (Script Debugger) in stand alone, but that doesn't work when invoked by Hazel. I need to be able to learn where the code fails when called by Hazel.
Sorry, but I don't understand how to attach a screenshot to show you the rules.