There is a lot manual file I/O which was ported over from org-policies in #465 . It seems very likely that there exists a library which could handle a lot of that for us.