async close() {
    if (this._context) {
      throw new DetoxInternalError(
        'Trying to close file streams from a non-root logger.\n' +
        'If you are not fiddling with Detox internals on purpose, yet you see this error, then...'
      );
    }

    await this._sharedConfig.bunyan.closeFileStreams();
  }
Closes the file descriptors to make sure that the temporary
JSONL files are flushed and contain the last error messages.
This safety measure is especially important for Windows OS.

@async
@internal