combined ReadFile and WriteFile into FileAccessor class