How to fix a corrupted dgd file

A step by step guide on how to fix a corrupted dgd file.