A comparative study of silver photodoping in chalcogenide films by means of extended X-ray absorption fine structure and kinetics measurements