Sometimes it can take several weeks to get straighten up on a new food...sometimes it takes me 3 or 4 weeks just to change them over to a new diet. He will be fine till you see the vet next week to check for worms or bacteria. Like I said if he does have them they are not bad as his coat and weight looks good and you are not seeing any in his poop. Just wash hands good when checking out or picking up poop and don't let kitty eat any of his poop.
Google can help get info on a lot of things but sometimes all the write ups are a bit scary and overdone. When worms can be dangerous is if a dog has had them for a really long time and heavy infested,they will get shabby dull coats,skinny but with popped bellies,pale gums and just look bad all over. Charlie is healthy and good weight and eating well with shiny coat,he may not even have any worms at all...it is just one of the many things to have checked with loose stools and rubbing his rear on ground. At vet they also will check his anal glands again for you. He sounds to be doing lots better on this food than the last one...so I would give it a little longer.
He will be ok and everything will get worked out...it just takes time and patience as each dog is different.