diff --git a/main.py b/main.py
index 0bb917f..04626fd 100644
--- a/main.py
+++ b/main.py
@@ -118,6 +118,14 @@ async def load_module_from_path(module_name, module_path):
             raise Exception("No Pipeline class found")
     except Exception as e:
         print(f"Error loading module: {module_name}")
+
+        # Move the file to the error folder
+        failed_pipelines_folder = os.path.join(PIPELINES_DIR, "failed")
+        if not os.path.exists(failed_pipelines_folder):
+            os.makedirs(failed_pipelines_folder)
+
+        failed_file_path = os.path.join(failed_pipelines_folder, f"{module_name}.py")
+        os.rename(module_path, failed_file_path)
         print(e)
     return None