Files as databases: writing and reading files