um you can try this.
var %dNpd $read(Npd.txt,w,$did(3).text) if (%dNpd == $did(3).text) { write -dl [ $+ [ $readn ] ] Npd.txt