Added debug printouts.