diff --git a/split-files.py b/split-files.py
index ad0d920..d978886 100644
--- a/split-files.py
+++ b/split-files.py
@@ -249,3 +249,8 @@ for file in files(buildroot):
     suffix = '*' if '/man/' in n else ''
 
     print(f'{prefix}{n}{suffix}', file=o)
+
+if [print(f'ERROR: no file names were written to {o.name}')
+    for o in outputs.values()
+    if o.tell() == 0]:
+    sys.exit(1)