close map file so that the agent can be reloaded