diff --git a/translator_script.py b/translator_script.py
index 3bff33eca4a21918d480256d290c1adda582cf61..8e6b5cf74777cb52b765f5ab1257784d5d1416bf 100644
--- a/translator_script.py
+++ b/translator_script.py
@@ -252,7 +252,10 @@ if file_content:
         if not USE_DEBUG_TEXT_IN_THE_OUTPUT:
             final_text = final_text + trans # exclude the debug text
         else:
-            final_text =final_text + chunk_divination + trans    
+            final_text =final_text + chunk_divination + trans
+        # In case the translation fails to an error when only part of the translation is done
+        # write the currently translated text also to the output.md
+        write_to_file("output.md", final_text)    
     print("  ")
     print("  ")
     write_to_file("output.md", final_text)