fix generating of json to target the correct file