added more try/except