I think we should use `ios::exceptions`, or check stream's validity of stream after all IO.
But lack of error checking is not introduced from this pull-request, so I think we should make another issue.