Try catch block added