Fixes program exiting (waits for file reporters to signal file writing is complete)