Fix master/slave json file creation problem