Read and write files

Rewrite pending. See also (Legacy) Reading files