added some extra logging