tweaked the criteria for the files dir patch