This looks wrong.  There are explicit references to `std::cerr` in this file.