updated the method in renameFiles method to take the path argument