check if map-file exists before doing the planning

Add a if condition using (prog-file) to detect if *map-file* exist
before calling the planning function