Added try/except

Added extra layer by putting it in a try/except