added missing try catch