Adding try catch