Updated template to handle multiple path