Use try/except correctly