checkpointing Map.py code