FODT Write Error. The file could not be written.

Dear LibreOffice Community,

I programmatically generate a FODT that opens without any problem and can be edited.

When saving such FODT document I get “Write Error. The file could not be written.”.

BTW the document is valid XML, is there a method to debug such issue?

I tried -DXSLTransformer.statsfile=/tmp/xslt_debug.txt as a Java startup parameter but the file is not created and I’m not sure that Java’s XSLT is called when saving a document.

Thanks a lot,

Build ID: 1:6.0.7-0ubuntu0.18.04.2
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3;
Locale: en-US (en_US.UTF-8); Calc: group