Update io-write-flow-file.py example with option
diff --git a/examples/addons/io-write-flow-file.py b/examples/addons/io-write-flow-file.py
index d956d5f85f..76fcbb46e5 100644
--- a/examples/addons/io-write-flow-file.py
+++ b/examples/addons/io-write-flow-file.py
@@ -8,8 +8,8 @@
 to multiple files in parallel.
 """
 
+import os
 import random
-import sys
 from typing import BinaryIO
 
 from mitmproxy import http
@@ -17,8 +17,11 @@
 
 
 class Writer:
-    def __init__(self, path: str) -> None:
-        self.f: BinaryIO = open(path, "wb")
+    def __init__(self) -> None:
+        # We are using an environment variable to keep the example as simple as possible,
+        # consider implementing this as a mitmproxy option instead.
+        filename = os.getenv("MITMPROXY_OUTFILE", "out.mitm")
+        self.f: BinaryIO = open(filename, "wb")
         self.w = io.FlowWriter(self.f)
 
     def response(self, flow: http.HTTPFlow) -> None:
@@ -29,4 +32,4 @@ def done(self):
         self.f.close()
 
 
-addons = [Writer(sys.argv[1])]
+addons = [Writer()]

#### Description

Update example addon as described in https://github.com/mitmproxy/mitmproxy/issues/6445

#### Checklist

 - [x] I have updated tests where applicable.
