add safe_main wrapper to avoid copy-paste spree of try-except around main in options unit tests