Added try catch