Added output into logger and ostream.