maintain comments when updating json5 files + other fixes