moved debugging funcs to separate file
changed debug output file formatting from %d to %04d for iteration
automatically compress cmresults (debug) files on-the-fly