Effects of Reynolds number and thickness on an undulatory self-propelled foil