Add try catch for exception