diff --git a/src/util/debug.cpp b/src/util/debug.cpp
index 21eca07d46e799c0a74481ed66d8f06b63f7f477..a15ef5c64b88d19d079b5db520a6ead5a841a0f9 100644
--- a/src/util/debug.cpp
+++ b/src/util/debug.cpp
@@ -1,12 +1,16 @@
-#include <cstdio>
 #include <cstdlib>
+#include <iostream>
 
 #include "util/debug.hpp"
 
 bool nest::mc::util::failed_assertion(const char *assertion, const char *file,
                                       int line, const char *func)
 {
-    std::fprintf(stderr, "%s:%d %s: Assertion `%s' failed.\n", file, line, func, assertion);
+    // Explicit flush, as we can't assume default buffering semantics on stderr/cerr,
+    // and abort() mignt not flush streams.
+
+    std::cerr << file << ':' << line << " " << func
+              << ": Assertion `" << assertion << "' failed." << std::endl;
     std::abort();
     return false;
 }