diff --git a/src/mlx/warnings.py b/src/mlx/warnings.py
index 894f799..165c447 100644
--- a/src/mlx/warnings.py
+++ b/src/mlx/warnings.py
@@ -359,7 +359,9 @@ def warnings_wrapper(args):
         if (not args.ignore) and (retval != 0):
             return retval
     else:
-        warnings_logfile(warnings, args.logfile)
+        retval = warnings_logfile(warnings, args.logfile)
+        if retval != 0:
+            return retval
 
     warnings.return_count()
     return warnings.return_check_limits()
@@ -383,7 +385,6 @@ def warnings_command(warnings, cmd):
     Raises:
         OSError: When program is not installed.
     '''
-
     try:
         print("Executing: ", end='')
         print(cmd)
@@ -410,6 +411,16 @@ def warnings_command(warnings, cmd):
 
 
 def warnings_logfile(warnings, log):
+    ''' Parse logfile for warnings
+
+    Args:
+        warnings (WarningsPlugin): Object for warnings where errors should be logged
+        log: Logfile for parsing
+
+    Return:
+        0: Log files existed and are parsed successfully
+        1: Log files did not exist
+    '''
     # args.logfile doesn't necessarily contain wildcards, but just to be safe, we
     # assume it does, and try to expand them.
     # This mechanism is put in place to allow wildcards to be passed on even when
@@ -417,9 +428,15 @@ def warnings_logfile(warnings, log):
     # so that the script can be used in the exact same way even when moving from one
     # OS to another.
     for file_wildcard in log:
-        for logfile in glob.glob(file_wildcard):
-            with open(logfile, 'r') as loghandle:
-                warnings.check(loghandle.read())
+        if glob.glob(file_wildcard):
+            for logfile in glob.glob(file_wildcard):
+                with open(logfile, 'r') as loghandle:
+                    warnings.check(loghandle.read())
+        else:
+            print("FILE: %s does not exist" % file_wildcard)
+            return 1
+
+    return 0
 
 
 def main():

Check if we could open a file
Now that we have a command option there is possibility that we missed the `--command` flag. In that moment plugin should tell us that files X, X, X do not exist and return non-0 value. 

Example that passes as it would be all ok (I assume also simpler stuff with empty and non existent log file passes as well):

```
mlx-warnings --sphinx --maxwarnings 0 --minwarnings 0 make -C example html
```

FYI: @SteinHeselmans @bavovanachte 
diff --git a/tests/test_integration.py b/tests/test_integration.py
index 9bc771a..e9556a3 100644
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -30,6 +30,10 @@ class TestIntegration(TestCase):
         retval = warnings_wrapper(['--junit', 'tests/junit_single_fail.xml', 'tests/junit_double_fail.xml'])
         self.assertEqual(1 + 2, retval)
 
+    def test_non_existing_logfile(self):
+        retval = warnings_wrapper(['--sphinx', 'not-exist.log'])
+        self.assertEqual(1, retval)
+
     def test_single_command_argument(self):
         retval = warnings_wrapper(['--junit', '--command', 'cat', 'tests/junit_single_fail.xml'])
         self.assertEqual(1, retval)

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-travis-fold pytest-cov mock coverage
apt-get update apt-get install -y gcc
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
coverage==6.2
importlib-metadata==4.8.3
iniconfig==1.1.1
junitparser==3.2.0
-e git+https://github.com/melexis/warnings-plugin.git@f0767be9f616ff41982ee3858ffe99554882cee7#egg=mlx.warnings
mock==5.2.0
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
pytest-travis-fold==1.3.0
setuptools-scm==6.4.2
tomli==1.2.3
typing_extensions==4.1.1
zipp==3.6.0

name: warnings-plugin
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - coverage==6.2
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - junitparser==3.2.0
      - mock==5.2.0
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytest-travis-fold==1.3.0
      - setuptools-scm==6.4.2
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/warnings-plugin

tests/test_integration.py::TestIntegration::test_non_existing_logfile
tests/test_integration.py::TestIntegration::test_command_revtal_err tests/test_integration.py::TestIntegration::test_command_revtal_err_supress tests/test_integration.py::TestIntegration::test_command_to_stderr tests/test_integration.py::TestIntegration::test_command_with_its_own_arguments tests/test_integration.py::TestIntegration::test_faulty_command tests/test_integration.py::TestIntegration::test_help tests/test_integration.py::TestIntegration::test_max tests/test_integration.py::TestIntegration::test_max_but_still_ok tests/test_integration.py::TestIntegration::test_min tests/test_integration.py::TestIntegration::test_min_but_still_ok tests/test_integration.py::TestIntegration::test_no_parser_selection tests/test_integration.py::TestIntegration::test_single_argument tests/test_integration.py::TestIntegration::test_single_command_argument tests/test_integration.py::TestIntegration::test_two_arguments tests/test_integration.py::TestIntegration::test_two_command_arguments tests/test_integration.py::TestIntegration::test_version tests/test_integration.py::TestIntegration::test_wildcarded_arguments
src/mlx/warnings.py
src/mlx/warnings.py