Reduced size of try/except block