check template exists before render attempt