Hi,
If the script fails at different places why do you assume the problem is with the upload?
Does it fail sporadically on the upload only?
How does the application behave during the upload? Is the script waiting for the upload to be finished or moving on to the next step?
Regards,
Shlomi
P.S. the whole purpose of this community is to share solutions for the benefit of all customers/users. We do not interact with users via their email directly to resolve issues.