public function resolve($path, $paths = null)
    {
        $resolvePath = $this->locate($path, $paths);

        $this->assert(
            $resolvePath || $this->hasOption('not_found_template'),
            sprintf(
                "Source file %s not found \nPaths: %s \nExtensions: %s",
                $path,
                implode(', ', $this->getOption('paths')),
                implode(', ', $this->getOption('extensions'))
            )
        );

        return $resolvePath;
    }