diff --git a/hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py b/hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py
index 14d0f491b8dccb41f7136087f4146f64e0470693..4e91fbbe4a4af2c16b7583443360a09d88b0ac61 100644
--- a/hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py
+++ b/hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py
@@ -50,7 +50,7 @@ def profile_configs(
         # Run binary_path binary,
         # which generates `profile_filename` and `qos_filename` file in cwd.
         try:
-            check_call([str(binary_path), "-c", str(temp_file.name)], stdout=PIPE)
+            check_call([str(binary_path), "-c", str(temp_file.name)])     
         except CalledProcessError as e:
             print("Output from the program:")
             print(e.output)
@@ -158,9 +158,12 @@ def read_hpvm_configs(config_file: PathLike) -> Tuple[str, List[Config]]:
 
 
 def write_hpvm_config(header: str, configs: Iterable[Config], to_file: PathLike):
+    
     text_segs = [header] + [str(config) for config in configs]
     with open(to_file, "w") as f:
         f.write("\n".join(text_segs))
+        f.flush()
+
 
 
 def _read_profile_file(profile_file_path: Path):