Hi Andrej Petras,
I noticed the problem occurs when you execute more than once the schema generation without deleting the output script file.