Including a map download command. Added critical sections for many filesystem functions.