added some debug prints to find check loop