don't write neither file.pb nor jsn when no events have been processed
Merge pull request #4674 from deguio/fixWritingForOnline

don't write neither file.pb nor jsn when 0 events have been processed