Fixed file access problem