added try catch block for loading map