Fix generate.bat script
Calculate statistics