How to determine what a 'General Error' is

I build ODT files programmatically but sometimes’ I get a ‘corrupt file’ message. The content looks ok after repair but I distrust the process now. This worked OK several years ago and even works SOMETIMES using 7.1 but not always.

Provide a sample file.

Also ODF validator could be helpful.