updated import logic and corrected a bug where the path to a template was used in the template name