IVGCVSW-4728 Attempt to fix test failures

Change-Id: I0e0d4a8338c7df4f09518d9f84605b3cc002f2b0
Signed-off-by: Éanna Ó Catháin <eanna.ocathain@arm.com>
diff --git a/src/timelineDecoder/JSONTimelineDecoder.cpp b/src/timelineDecoder/JSONTimelineDecoder.cpp
index 520995a..84472d8 100644
--- a/src/timelineDecoder/JSONTimelineDecoder.cpp
+++ b/src/timelineDecoder/JSONTimelineDecoder.cpp
@@ -8,6 +8,7 @@
 
 #include <string>
 #include <fstream>
+#include <boost/filesystem/fstream.hpp>
 
 namespace armnn
 {
@@ -245,9 +246,9 @@
 void JSONTimelineDecoder::PrintJSON(JSONTimelineDecoder::JSONEntity& rootEntity)
 {
     std::string jsonString = GetJSONString(rootEntity);
-    std::ofstream outfile;
-    outfile.open(this->outputJSONFile);
-    outfile << jsonString;
+    boost::filesystem::ofstream ofs{this->outputJSONFile};
+    ofs << jsonString;
+    ofs.close();
 }
 
 std::string JSONTimelineDecoder::GetJSONString(JSONTimelineDecoder::JSONEntity& rootEntity)