fixig issue where template does not exist and needs to be created