Added a try-catch