more file ostream fixes