If file is destroyed and stream ends afterwards, then an exception is
thrown because self._torrent is undefined.