Write out customId when writing out config
Added various rules