locate() updated with a second if statement to ignore the xml files only when there is a preceeding extention before it