Changing debug output to use std::clog