My above code is working perfect alright..
Just the problem was the name of the file i was getting is not proper i.e. it has special characters and blank spaces too which the downloader couldn't get it so the downloading wasn't initiated.
Just tell your web_dept person to rename file to proper format. or you have to use the string operations to rename the file properly.