Problem with Droplet

I have a pretty lengthy script that I have tried to turn into a drop let. I added the code below wrapping my script, but when I drop the file on it does not finish all the code. It seems to stop before it runs some of the last methods. When I change the script to do a choose folder the whole script works perfectly. Can someone tell me what I am doing wrong.

Thanks,

on open {theFolder}

End Open

if post the script you can just about guarantee some will help you…