diff --git a/hub/city_model_structure/city.py b/hub/city_model_structure/city.py
index e34e153f..f3bdea40 100644
--- a/hub/city_model_structure/city.py
+++ b/hub/city_model_structure/city.py
@@ -8,6 +8,7 @@ Code contributors: Peter Yefi peteryefi@gmail.com
 from __future__ import annotations
 
 import bz2
+import logging
 import sys
 import pickle
 import math
@@ -70,10 +71,9 @@ class City:
         if self._srs_name in GeometryHelper.srs_transformations.keys():
           self._srs_name = GeometryHelper.srs_transformations[self._srs_name]
         input_reference = pyproj.CRS(self.srs_name)  # Projected coordinate system from input data
-      except pyproj.exceptions.CRSError:
-        sys.stderr.write('Invalid projection reference system, please check the input data. '
-                         '(e.g. in CityGML files: srs_name)\n')
-        sys.exit()
+      except pyproj.exceptions.CRSError as err:
+        logging.error('Invalid projection reference system, please check the input data. (e.g. in CityGML files: srs_name)')
+        raise pyproj.exceptions.CRSError from err
       transformer = Transformer.from_crs(input_reference, gps)
       coordinates = transformer.transform(self.lower_corner[0], self.lower_corner[1])
       self._location = GeometryHelper.get_location(coordinates[0], coordinates[1])
diff --git a/setup.py b/setup.py
index 020562ab..302f3b94 100644
--- a/setup.py
+++ b/setup.py
@@ -61,8 +61,8 @@ setup(
               'hub.exports.energy_systems',
               'hub.exports.formats',
               'hub.helpers',
+              'hub.helpers.peak_calculation',
               'hub.helpers.data',
-              'hub.hub_logger',
               'hub.imports',
               'hub.imports.construction',
               'hub.imports.construction.helpers',