Added debug statements to endProgram(), just in case