fails:IO#fileno raises IOError on closed stream
