Added try-catch