Save map into file