refactor adfs::file read/write for class