How do you know it doesn't open the file?
Which line of code do you think fails?