public function getTemplateFile($template)
    {
        $file = $template . $this->suffix;
        if (is_file($file)) {
            return $file;
        }

        foreach ($this->paths as $path) {
            $file = $path . "/" . $template . $this->suffix;
            if (is_file($file)) {
                return $file;
            }
        }

        throw new Exception("Could not find template file '$template'.");
    }