diff --git a/helper/report.go b/helper/report.go index 24833a4..db1ed7f 100644 --- a/helper/report.go +++ b/helper/report.go @@ -116,5 +116,10 @@ func (r *Report) WriteToFile(fileName string) error { defer file.Close() - return r.WriteToWriter(file) + err = r.WriteToWriter(file) + if err != nil { + return err + } + + return file.Sync() }