protected function assertFile($name)
    {
        if (strpos($name, '..') !== false) {
            throw new \InvalidArgumentException("File name '$name' isn't valid");
        }
        
        $file = $this->getFilePath($name);
        
        if (!file_exists($file)) {
            throw new \RuntimeException("View file '$file' doesn't exist");
        }
    }