When you set %rp variable for one address, it's repleaced with other address on other setting. And no need for it.
set %rp $address($2,4) | /write blacklist.txt %rp
Can be done as
write blacklist.txt $address($2,4)