Read and write map files.