Try-except added to ensure full run