Migrate a lot more fs. calls to files.