Modified generator script and added DEBUG flags for printing