Add try-except logic to main().