less debug code + dump out to std::cout instead of std::cerr