Ensures that load/sync loop terminates properly