Add try-catch statement