added some debugging logs