check if templates exist before rendering config file

Change-Id: Idd1b088e8e003b01bb921afc39494e8ca12c015d