Made more specific try/except