use function_exported instead of try/catch