Fixed file access bug.