Here is an update to this.
After Activating the edt log, we found out that the data connection closes abruptly.
This is the reason for the zero byte file.
This is an Environment issue , as the same application works fine at other sites.
But we are not sure what is causing the connection to close.
Issue still remains.
Regards
Surya