diff --git a/Tests/tests.json b/Tests/tests.json
index 91ff205a2f9262df8fc96b9b6ca7fb1e0506ab85..f8c6e04b4d43df70d93ae8bb42a48163f01363a4 100644
--- a/Tests/tests.json
+++ b/Tests/tests.json
@@ -6,6 +6,9 @@
     {
 	"title": "Segments",
 	"command":
-	["$src_dir/segments.py", "$tests_old_dir/EGr2nd15md4/edgelist.csv"]
+	[
+	    "$src_dir/segments.py", "$tests_old_dir/EGr2nd15md4/edgelist.csv",
+	    "segments.graphml"
+	]
     }
 ]    
diff --git a/segments.py b/segments.py
index a37fa39c169f54bd31cd3f86fc5e23b681dd2196..9b98808ea41f4626a2dd20434c9a2547c4b9ba9c 100755
--- a/segments.py
+++ b/segments.py
@@ -14,7 +14,7 @@ import sys
 # load the edgelist file #
 ##########################
 
-if len(sys.argv) != 2: sys.exit("Required argument: edgelist-file")
+if len(sys.argv) != 3: sys.exit("Required arguments: input-file output-file")
 t0 = time.perf_counter()
 print('Loading edgelist file...')
 g = graph_tool.load_graph_from_csv(sys.argv[1],
@@ -77,7 +77,7 @@ t1 = time.perf_counter()
 print(f"Done deleting in {t1 - t0:.0f} s")
 t0 = t1
 print('Saving graph...')
-g.save('segmented.gt')
+g.save(sys.argv[2])
 t1 = time.perf_counter()
 print(f'Done saving in {t1 - t0:.0f} s.')
 print("Everything is cool.")