diff --git a/smac/utils/io/cmd_reader.py b/smac/utils/io/cmd_reader.py
index 74d6f2f7b..129480a2f 100644
--- a/smac/utils/io/cmd_reader.py
+++ b/smac/utils/io/cmd_reader.py
@@ -134,19 +134,8 @@ class ReadPCSFileAction(Action):
         fn = values
         if fn:
             if os.path.isfile(fn):
-                # Three possible formats: json, pcs and pcs_new. We prefer json.
-                with open(fn) as fp:
-                    if fn.endswith('.json'):
-                        parsed_scen_args['cs'] = pcs_json.read(fp.read())
-                        logger.debug("Loading pcs as json from: %s", fn)
-                    else:
-                        pcs_str = fp.readlines()
-                        try:
-                            parsed_scen_args["cs"] = pcs.read(pcs_str)
-                        except:
-                            logger.debug("Could not parse pcs file with old format; trying new format ...")
-                            parsed_scen_args["cs"] = pcs_new.read(pcs_str)
-                    parsed_scen_args["cs"].seed(42)
+                parsed_scen_args['cs'] = in_reader.read_pcs_file(fn)
+                parsed_scen_args["cs"].seed(42)
             else:
                 parser.exit(1, "Could not find pcs file: {}".format(fn))
         setattr(namespace, self.dest, values)
diff --git a/smac/utils/io/input_reader.py b/smac/utils/io/input_reader.py
index 794aa825d..de7a723c3 100644
--- a/smac/utils/io/input_reader.py
+++ b/smac/utils/io/input_reader.py
@@ -1,5 +1,6 @@
 import numpy as np
-from smac.configspace import pcs
+from smac.configspace import pcs, pcs_new
+from smac.configspace import json as pcs_json
 
 __author__ = "Marius Lindauer"
 __copyright__ = "Copyright 2015, ML4AAD"
@@ -172,8 +173,11 @@ class InputReader(object):
                 instances[tmp[0]] = np.array(tmp[1:], dtype=np.double)
         return [f.strip() for f in lines[0].rstrip("\n").split(",")[1:]], instances
 
-    def read_pcs_file(self, fn: str):
-        """Encapsulates generating configuration space object
+    @staticmethod
+    def read_pcs_file(fn: str, logger=None):
+        """Encapsulates generating configuration space object from file.
+
+        Automatically detects whether the cs is saved in json, pcs or pcs_new.
 
         Parameters
         ----------
@@ -184,5 +188,18 @@ class InputReader(object):
         -------
             ConfigSpace: ConfigSpace
         """
-        space = pcs.read(fn)
-        return space
+        # Three possible formats: json, pcs and pcs_new. We prefer json.
+        with open(fn) as fp:
+            if fn.endswith('.json'):
+                cs = pcs_json.read(fp.read())
+                if logger:
+                    logger.debug("Loading pcs as json from: %s", fn)
+            else:
+                pcs_str = fp.readlines()
+                try:
+                    cs = pcs.read(pcs_str)
+                except NotImplementedError:
+                    if logger:
+                        logger.debug("Could not parse pcs file with old format; trying new format ...")
+                    cs = pcs_new.read(pcs_str)
+        return cs

.pcs read and write error
#### Description
.pcs file read and write does not work

#### Steps/Code to Reproduce
```
#!/usr/bin/env python

from smac.configspace import (ConfigurationSpace,
                              Configuration)
from ConfigSpace.hyperparameters import (CategoricalHyperparameter,
                                         UniformFloatHyperparameter,
                                         UniformIntegerHyperparameter, )
from ConfigSpace.read_and_write import pcs
from smac.utils.io.output_writer import OutputWriter
from smac.utils.io.input_reader import InputReader



cs = ConfigurationSpace()
hyp = UniformFloatHyperparameter('A',
                                 0.0,
                                 1.0,
                                 default_value=0.5)
cs.add_hyperparameters([hyp])

o = OutputWriter()
o.save_configspace(cs, 'configspace.pcs', 'pcs_new')

i = InputReader()
cs = i.read_pcs_file('configspace.pcs')
# first error, empty output, parameter is not read in, in read_pcs_file the file is not opened
# with open(fn) as file:
#     file_string = file.readlines()
print(cs)

# Optional solution also not working: Seems like the pcs format changed at some point
# If 'real' is removed it works
with open('configspace.pcs') as file:
    file_string = file.readlines()
    cs = pcs.read(file_string)
print(cs)
```

#### Versions
0.10.0

Thanks!

diff --git a/test/test_utils/io/test_inputreader.py b/test/test_utils/io/test_inputreader.py
index ee7d5fd11..bcde0ec98 100644
--- a/test/test_utils/io/test_inputreader.py
+++ b/test/test_utils/io/test_inputreader.py
@@ -9,7 +9,11 @@ import logging
 
 import numpy as np
 
+from smac.configspace import ConfigurationSpace
+from ConfigSpace.hyperparameters import UniformFloatHyperparameter
+from smac.configspace import pcs
 from smac.utils.io.input_reader import InputReader
+from smac.utils.io.output_writer import OutputWriter
 
 
 class InputReaderTest(unittest.TestCase):
@@ -24,7 +28,20 @@ class InputReaderTest(unittest.TestCase):
                                                       '..', '..'))
         os.chdir(base_directory)
 
+        # Files that will be created:
+        self.pcs_fn = "test/test_files/configspace.pcs"
+        self.json_fn = "test/test_files/configspace.json"
+
+        self.output_files = [self.pcs_fn, self.json_fn]
+
     def tearDown(self):
+        for output_file in self.output_files:
+            if output_file:
+                try:
+                    os.remove(output_file)
+                except FileNotFoundError:
+                    pass
+
         os.chdir(self.current_dir)
 
     def test_feature_input(self):
@@ -37,3 +54,36 @@ class InputReaderTest(unittest.TestCase):
                           "inst3":[1.7, 1.8, 1.9]}
         for i in feats[1]:
             self.assertEqual(feats_original[i], list(feats[1][i]))
+
+    def test_save_load_configspace(self):
+        """Check if inputreader can load different config-spaces"""
+        cs = ConfigurationSpace()
+        hyp = UniformFloatHyperparameter('A', 0.0, 1.0, default_value=0.5)
+        cs.add_hyperparameters([hyp])
+
+        output_writer = OutputWriter()
+        input_reader = InputReader()
+
+        # pcs_new
+        output_writer.save_configspace(cs, self.pcs_fn, 'pcs_new')
+        restored_cs = input_reader.read_pcs_file(self.pcs_fn)
+        self.assertEqual(cs, restored_cs)
+        restored_cs = input_reader.read_pcs_file(self.pcs_fn, self.logger)
+        self.assertEqual(cs, restored_cs)
+
+        # json
+        output_writer.save_configspace(cs, self.json_fn, 'json')
+        restored_cs = input_reader.read_pcs_file(self.json_fn)
+        self.assertEqual(cs, restored_cs)
+        restored_cs = input_reader.read_pcs_file(self.json_fn, self.logger)
+        self.assertEqual(cs, restored_cs)
+
+        # pcs
+        with open(self.pcs_fn, 'w') as fh:
+            fh.write(pcs.write(cs))
+        restored_cs = input_reader.read_pcs_file(self.pcs_fn)
+        self.assertEqual(cs, restored_cs)
+        restored_cs = input_reader.read_pcs_file(self.pcs_fn)
+        self.assertEqual(cs, restored_cs)
+        restored_cs = input_reader.read_pcs_file(self.pcs_fn, self.logger)
+        self.assertEqual(cs, restored_cs)

pip install -e .
parse_log_pytest
requirements.txt
nose pytest
apt-get update apt-get install -y build-essential swig
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
attrs==22.2.0
Babel==2.11.0
certifi==2021.5.30
charset-normalizer==2.0.12
ConfigSpace==0.4.19
Cython==3.0.12
docutils==0.18.1
emcee==3.1.6
george==0.4.0
idna==3.10
imagesize==1.4.1
importlib-metadata==4.8.3
iniconfig==1.1.1
Jinja2==3.0.3
joblib==1.1.1
MarkupSafe==2.0.1
nose==1.3.7
numpy==1.19.5
packaging==21.3
pandas==1.1.5
patsy==1.0.1
pluggy==1.0.0
psutil==7.0.0
py==1.11.0
pyDOE==0.3.8
Pygments==2.14.0
pynisher==0.6.4
pyparsing==3.1.4
pyrfr==0.8.2
pytest==7.0.1
python-dateutil==2.9.0.post0
pytz==2025.2
requests==2.27.1
scikit-learn==0.24.2
scipy==1.5.4
six==1.17.0
-e git+https://github.com/automl/SMAC3.git@d668494b5ea23a0a6e1d60cceabddd526dac2228#egg=smac
snowballstemmer==2.2.0
sobol-seq==0.2.0
Sphinx==5.3.0
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
statsmodels==0.12.2
threadpoolctl==3.1.0
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: SMAC3
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:
      - alabaster==0.7.13
      - attrs==22.2.0
      - babel==2.11.0
      - charset-normalizer==2.0.12
      - configspace==0.4.19
      - cython==3.0.12
      - docutils==0.18.1
      - emcee==3.1.6
      - george==0.4.0
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - joblib==1.1.1
      - markupsafe==2.0.1
      - nose==1.3.7
      - numpy==1.19.5
      - packaging==21.3
      - pandas==1.1.5
      - patsy==1.0.1
      - pluggy==1.0.0
      - psutil==7.0.0
      - py==1.11.0
      - pydoe==0.3.8
      - pygments==2.14.0
      - pynisher==0.6.4
      - pyparsing==3.1.4
      - pyrfr==0.8.2
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - requests==2.27.1
      - scikit-learn==0.24.2
      - scipy==1.5.4
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sobol-seq==0.2.0
      - sphinx==5.3.0
      - sphinx-rtd-theme==2.0.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - statsmodels==0.12.2
      - threadpoolctl==3.1.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/SMAC3

test/test_utils/io/test_inputreader.py::InputReaderTest::test_save_load_configspace
test/test_utils/io/test_inputreader.py::InputReaderTest::test_feature_input
smac/utils/io/input_reader.py smac/utils/io/cmd_reader.py
smac/utils/io/input_reader.py smac/utils/io/cmd_reader.py