Added debug printouts