clean core files.json and avoid repeated includes