add protection against overwrite and updating a password