after the if statement, if the member was found, you can simply replace the
msg # $2 found
with
write $+(-dl,$readn) members.txt


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius