diff --git a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/debug.cpp b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/debug.cpp
index 8e5e1fe9689853ee3ff547b62c5d44660db27b04..2fdeb2f55bcff4895f66fcefee411f1f57cfe4ef 100644
--- a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/debug.cpp
+++ b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/debug.cpp
@@ -32,8 +32,8 @@ void ERROR(const char *format, ...) {
     return;
   va_list args;
   va_start(args, format);
-  printf("ERROR!: ");
-  vprintf(format, args);
+  fprintf(stderr, "ERROR!: ");
+  vfprintf(stderr, format, args);
   va_end(args);
 
   abort();