The bug is due to my beginners knowledge of Tcl/Tk... I used "lsearch" to search a string, using the key "loop1", but it needs the entire space-delimited string, that is, "/dev/loop1". The reason is, the "l" in lsearch means to search a list, which is space-delimited.