Updated the map control to save the map to a file.

Fixed bug in the thread safe control.