Issue running a business process involving a script in Control Tower!

Hi - I created a business process that includes a groovy script as an individual bot task and a few other bot tasks created using the RPA recorder. When I connect all these together in the control tower and run, the groovy script is being executed - i can see the results on the desktop but that particular bot task is not completing so that the next step in the business process is exegroovy script.txt (4.9 KB) cuted. Although the script does what it is supposed to do, the progress still shows 0/1 and it is stuck there and the process is not moving forward. I am not really sure what is happening.

Please see the attached script and let me know if i am not ending the code properly so that the process keeps moving forward.

Thanks in advance!