diff --git a/.gitignore b/.gitignore
index f7793d5f492cced655aeb62a8c29af48ac3e452e..222931f853f9ddf2e25dbfb6c26f1051c456bef4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,9 +45,10 @@ Thumbs.db
 /data/
 /plots/
 
-# tmp folder #
-##############
+# tmp and logging folder #
+##########################
 /tmp/
+/logging/
 
 # test related data #
 #####################
diff --git a/src/helpers.py b/src/helpers.py
index 6e9d47d1040aa803358cb60439197fd48641e9e1..cfbaa79dc2f35836230bed04ac88204c5fbb1ec8 100644
--- a/src/helpers.py
+++ b/src/helpers.py
@@ -252,8 +252,7 @@ class Logger:
         :return: path of logfile
         """
         if not path:  # set default path
-            path = os.path.dirname(sys.modules["__main__"].__file__)
-            path = os.path.join(path, "logging")
+            path = os.path.join(os.path.dirname(__file__), "..", "logging")
         if not os.path.exists(path):
             os.makedirs(path)
         runtime = time.strftime("%Y-%m-%d_%H-%M-%S", time.localtime())