Fix bug where runtime_stats.json is overwritten