Issue with Ajax Click and Script Script

I recorded a business use case using Ajax Click and Script in LR9.1
there is no corelation done in the script.
I replayed the script as it is and it worked sometimes. Sometimes it fails. The business use case is to upload a file into a product container. In this case the file isnot uploaded. Any help would be appreciated.

I am attaching the Vuser.C file.