Added debug statement to plan_to_dict()