fix file access based on internal and internal file