Throw error if template doesn't exist