Your while loop is set up in a bad. You should perform checks to make sure your reading actual lines of the text file
This is yours:
while ($read(blacklist.txt,%blacklist) != $null) {
did -a blacklist 6 $read(blacklist.txt,%blacklist)
inc %blacklist
}
A better one should be:
while (%blacklist <= $lines(blacklist.txt) {
did -a blacklist 6 $read(blacklist.txt,%blacklist)
inc %blacklist
}
The $lines identifier returns the number of lines in a text file. Although both formats will still grab everything from a txt file, this is a cleaner way of doing it