Replaced some std::c(out|err)'s with logging.