Add try catch handler