Well, the problem does not lie in the script. I think it is the clustered web server problem. Coz before this clustered setup was implemented by x10, flash uploads were working fine.
I do not know the exact problem, but the uploader form shows an error while uploading: Server IO problem...