Added debugging printfs