anchor.diff:        return _closeCompleter.future;
       }
       _closed = true;
  +
       void done() {
         _closeCompleter.complete();
         _controller.close();
       }
  -    if (_openedFile != null) {
  -      _openedFile.close()
  -          .catchError(_controller.addError)
  -          .whenComplete(done);
  -      _openedFile = null;
  -    } else {
  -      done();
  -    }
  +
  +    _openedFile.close()
  +        .catchError(_controller.addError)
  +        .whenComplete(done);
       return _closeCompleter.future;
     }
   
     void _readBlock() {
       // Don't start a new read if one is already in progress.
       if (_readInProgress) return;
  +    if (_atEnd) {
  +      _closeFile();
  +      return;
  +    }
       _readInProgress = true;
       int readBytes = _BLOCK_SIZE;
       if (_end != null) {
  
positive.code:       }
      }
      _openedFile.read(readBytes)
        .whenComplete(() {
          _readInProgress = false;
        })
        .then((block) {
          if (_unsubscribed) {
            _closeFile();
            return;
          }
          if (block.length == 0) {
            if (!_unsubscribed) {
              _closeFile();
              _unsubscribed = true;
            }
            return;
          }
          _position += block.length;
          if (_paused) {
            _currentBlock = block;
          } else {
            _controller.add(block);
            _readBlock();
          }
        })
        .catchError((e) {
          if (!_unsubscribed) {
            _controller.addError(e);
            _closeFile();
            _unsubscribed = true;
          }
  
negative.code:   void _setupController() {
      _controller = new StreamController<List<int>>(sync: true,
          onListen: _start,
          onResume: _readBlock,
          onCancel: () {
            _unsubscribed = true;
            return _closeFile();
  