Added a try block