Simplified try except logic