format kpeg rule file