Saves and loads data from disk.