Replaced argument "pat" with "path" in list.files call