readMap method : reading map from file