disable creation of runtime.json when not needed

Even with `PERSIST_ON_CHANGE='N'` and `DISABLE_FILE_WATCH='Y'`, `runtime.json` is still created empty. This patch fixes it.