Added the last line (dumpnum++) that allows it to actually make sense.