fix: some file access function types
refactor: fix inconsistency in file access function definitions
feat: add structure for dynamic file access