Please from someone who is studying Canine behaviour and training to degree level do not try this method as it has the potential to go horribly wrong.
The behaviour may have stopped for now but It will very probably happen again and then you would have to punish your dog all over or escalate the punishment to more intense levels to get results.
What would this do to your relationship with your dog?
It is right to distract the dog whilst in the act but why not give him his own area where he can be directed to dig. You could make him some sort of sand pit and bury treats and toys to make it interesting.
Digging is a perfectly normal canine behaviour and your dog is not being naughty he is doing what comes naturally to him.
Dogs dig for various reasons and it might be worth taking time to understand his motivation for this behaviour.
Yelling Timeout will have no meaning for your dog and your dog will just see you as angry and learn that it's ok to dig when your'e not around but dangerous to do so if your'e there
I hope Fred stops for his sake
Mark