Added exception catch