Add try/except code