Added exception catches