How are the files stored in the CMS? Node Attachment, custom field, media library?
What control are you using to display the data, as it's possibly the datasource that is wrong?
You say it gives a different name, but is the link and content of the file itself correct? Or are you just getting random documents?