Do you notice anything in the undigested food besides the food? Perhaps he is eating something that is making him ill? If the problem has been persisting for more than a month I would take him to the vet to make sure that there is no serious underlying cause that might only be getting worse over time.