Added debug printing to script.