Add try/catch blocks