Revert topic 'file-GENERATE-fixes'

It will be revised and restored.
Merge topic 'file-GENERATE-fixes' into next

832e150e Revert topic 'file-GENERATE-fixes'