in reply to Re: Error opening a file
in thread Error opening a file

This is just a crazy guess , but maybe the variable is not what you expect.
-X-