save map to file