But, even without seeing your complete script, I may know what's wrong: You do not use the filename for the stampName, you use the stamp's internal name, which you can find by using the page template feature and looking up the page template name. Here you will see something like
#1234567=The stamp name
Use the string that you retrieve via either one of these methods as the stamp name.
the template feature gave the correct file name will let you know what happens next...
Again, this is not a file name, it's the stamp name. There is no rule about the filename, you can name it anything, it can even have more than one stamp in it. The key is that you have a template with a name that follows a certain naming convention ("#InternalStampName=Stamp name that gets displayed").