Writing to mutiple binary save files with FFileHelper

Hello and good afternoon,

I have been working on a save system for my game, in which it saves 2 files to the player hard drive, a save file (containing all the game data to be loaded) and a header file (containing data about the save file itself, such as player name, save date, game completion);
I split those in 2 because the game saves tend to get too large, and so, loading them completely just to show what save file the player is about to choose becomes a chore, and really slow, so to show the player what file he is about to choose, the system loads only the header, and then, after player confirmation, the system loads the game data.
However, I am having issues in writing those 2 files to disk, the reason is, the CPP code only writes the first file to the disk, doesn’t matter which one is going to be written first, being the header or the game data, I assume its because the writer is busy, however i don’t know how to get its current state, so I can delay the next file write;

Can anyone please give me some help with that?

Here is my CPP code (ignore some of the unused functions or parameters, code is still WIP) (the save call starts at SaveGame() ):

void DTSaveManager::ProcessData(FArchive& dataArchive){
	dataArchive << ADTGameState::GetDataForSave()->inGameVariables.integers;
	dataArchive << ADTGameState::GetDataForSave()->inGameVariables.floats;
	dataArchive << ADTGameState::GetDataForSave()->inGameVariables.booleans;
	for (auto inGameStrings : ADTGameState::GetDataForSave()->inGameVariables.fStrings)
		dataArchive << inGameStrings;
}

void DTSaveManager::ProcessHeader(FArchive& dataArchive){
	//FILL WITH HEADER DATA (TO DO)
	//USING GAME DATA AS PLACE HOLDER...
	dataArchive << ADTGameState::GetDataForSave()->inGameVariables.integers;
	dataArchive << ADTGameState::GetDataForSave()->inGameVariables.floats;
	dataArchive << ADTGameState::GetDataForSave()->inGameVariables.booleans;
	for (auto inGameStrings : ADTGameState::GetDataForSave()->inGameVariables.fStrings)
		dataArchive << inGameStrings;
}
bool DTSaveManager::SaveData(FString location){
	FBufferArchive dataArchive;
	ProcessData(dataArchive);

	if (dataArchive.Num() <= 0){
		UE_LOG(LogTemp, Warning, TEXT("FAILED TO SAVE DATA TO FILE! SAVE CANCELLED!"));
		return false;
	}

	if (FFileHelper::SaveArrayToFile(dataArchive, *location)){
		dataArchive.FlushCache();
		dataArchive.Empty();
		return true;
	}

	dataArchive.FlushCache();
	dataArchive.Empty();

	return false;
}

bool DTSaveManager::SaveHeader(FString location){
	FBufferArchive dataArchive;
	ProcessHeader(dataArchive);

	if (dataArchive.Num() <= 0){
		UE_LOG(LogTemp, Warning, TEXT("FAILED TO SAVE HEADER TO FILE! SAVE CANCELLED!"));
		return false;
	}

	if (FFileHelper::SaveArrayToFile(dataArchive, *location)){
		dataArchive.FlushCache();
		dataArchive.Empty();
		return true;
	}

	dataArchive.FlushCache();
	dataArchive.Empty();

	return false;
}


//SYSTEM CALLS THIS FUNCTION TO START GAME SAVING (DATA AND HEADER)
bool DTSaveManager::SaveGame(FString folderName, FString location = DT_SP_SETTINGS_SAVE_LOCATION){
	//location = location.Append("\\").Append(folderName);
	location = "C:\\Saves\\DERP";
	if (FPlatformFileManager::Get().GetPlatformFile().CreateDirectory(*location)){
		//ATTEMPTS TO SAVE GAME DATA, AND RETURNS THE RESULT, FALSE, MEANS FAIL, TRUE, MEANS SUCESS IN SAVING
		return (DTSaveManager::SaveData(location.Append("\\").Append("Data.dtsave")) && DTSaveManager::SaveHeader(location.Append("\\").Append("Header.dtsave")));
	} else {
		UE_LOG(LogTemp, Warning, TEXT("FAILED TO CREATE/OPEN DIRECTORY FOR SAVE! SAVE CANCELLED!"));
		return false;
	}
}

Yo most likely need to call dataArchive.Close(); to close that buffer after first file…