fix some files access issues