fails:IO#flush raises IOError on closed stream
