Simple serializing of a map to file.