Added synchronized ostream