update scripts to prevent duplicates and add verification