Added map checking and loading