fix debug print to stdout vs. stderr.