Oh boy! Well traditionally it always help to change the food over gradually, usually over a week is recommended. Other than that, there really is no way to safeguard against an upset tummy.
On a side note, you may really want to consider giving your dog a better quality of food. Beneful is ok, but considering that your dog has other health problems, he may benefit more from higher end foods like Neutro. My Pit has always had a very sensitive tummy, constant diarreah, colitis, you name it..i experienced it. I tried a ton of differrent foods, but Neutro sensitive stomach has been a miracle worker. No more diarrah, no more colitis, and a way healther dog.
Best of luck you and your baby!