diff --git a/src/velociraptor_interface.c b/src/velociraptor_interface.c
index 4587a465979976f9e33f05eabb0071ce84c77ad6..9837de6bcdf772b74417a2efe414069dc916f4fa 100644
--- a/src/velociraptor_interface.c
+++ b/src/velociraptor_interface.c
@@ -120,8 +120,9 @@ void velociraptor_init(struct engine *e) {
         sim_info.cellloc[i].loc[2] = unit_info.lengthtokpc * s->cells_top[i].loc[2];
     }
 
-    char configfilename[PARSER_MAX_LINE_SIZE];
+    char configfilename[PARSER_MAX_LINE_SIZE], outputFileName[FILENAME_BUFFER_SIZE];
     parser_get_param_string(e->parameter_file, "StructureFinding:config_file_name", configfilename);
+    snprintf(outputFileName, FILENAME_BUFFER_SIZE, "%s.VELOCIraptor", e->stfBaseName);
     
     message("Config file name: %s", configfilename);
     message("Period: %e", sim_info.period);
@@ -133,7 +134,7 @@ void velociraptor_init(struct engine *e) {
     //message("Local top-level cell locations range: (%e,%e,%e) -> (%e,%e,%e)", cell_loc_min[0], cell_loc_min[1], cell_loc_min[2], cell_loc_max[0], cell_loc_max[1], cell_loc_max[2]);
     message("Top-level cell locations range: (%e,%e,%e) -> (%e,%e,%e)", sim_info.cellloc[0].loc[0], sim_info.cellloc[0].loc[1], sim_info.cellloc[0].loc[2], sim_info.cellloc[sim_info.numcells - 1].loc[0], sim_info.cellloc[sim_info.numcells - 1].loc[1], sim_info.cellloc[sim_info.numcells - 1].loc[2]);
 
-    InitVelociraptor(configfilename, cosmo_info, unit_info, sim_info);
+    InitVelociraptor(configfilename, outputFileName, cosmo_info, unit_info, sim_info);
 
     /* Free cell locations after VELOCIraptor has copied them. */
     //free(sim_info.cellloc);
diff --git a/src/velociraptor_interface.h b/src/velociraptor_interface.h
index 71366dfe5d24ed4dac4bc27e7d1cae37002ab385..c14da03be0922033a16d74f55be68d8c23834500 100644
--- a/src/velociraptor_interface.h
+++ b/src/velociraptor_interface.h
@@ -68,7 +68,7 @@ struct siminfo {
 };
 
 /* VELOCIraptor interface. */
-void InitVelociraptor(char* config_name, struct cosmoinfo cosmo_info, struct unitinfo unit_info, struct siminfo sim_info);
+void InitVelociraptor(char* config_name, char* output_name, struct cosmoinfo cosmo_info, struct unitinfo unit_info, struct siminfo sim_info);
 void InvokeVelociraptor(const int num_gravity_parts, struct gpart *gravity_parts, const int *cell_node_ids, char* output_name);
 
 /* VELOCIraptor wrapper functions. */