diff --git a/apps/nsq_to_file/file_logger.go b/apps/nsq_to_file/file_logger.go
index <HASH>..<HASH> 100644
--- a/apps/nsq_to_file/file_logger.go
+++ b/apps/nsq_to_file/file_logger.go
@@ -212,16 +212,13 @@ func (f *FileLogger) Write(p []byte) (int, error) {
 }
 
 func (f *FileLogger) Sync() error {
-	var err error
 	if f.gzipWriter != nil {
-		f.gzipWriter.Close()
-		err = f.out.Sync()
-		f.gzipWriter, _ = gzip.NewWriterLevel(f, f.opts.GZIPLevel)
-		f.writer = f.gzipWriter
-	} else {
-		err = f.out.Sync()
+		err := f.gzipWriter.Flush()
+		if err != nil {
+			return err
+		}
 	}
-	return err
+	return f.out.Sync()
 }
 
 func (f *FileLogger) currentFilename() string {
nsq_to_file: don't open multiple GZIP streams

This changes the structure of output files to be continuous GZIP
streams rather than concatenated GZIP streams.

This is likely slightly more compatible and expected.