Fix race in file writing between simctl and SimStreamProcessorService
Fix race in file writing between simctl and SimStreamProcessorService

Summary: The comments mostly cover this, but there is indeed some kind of race since `simctl` can terminate before the file is written out. To work around this, we have a minimal check that the file has content before yielding back.

Reviewed By: zeyadsalloum

Differential Revision: D14702992

fbshipit-source-id: af1c7b358e45cb00bd6e3a9239f704e12a4d489a

facebook/FBSimulatorControl,facebook/FBSimulatorControl,facebook/FBSimulatorControl,facebook/FBSimulatorControl,facebook/FBSimulatorControl