Added debug printfs