Moved all debug output to STDOUT (some was going to STDERR).