public function renderAndWriteFile($inputFile, $outputFile, array $parameters = [])
    {
        $outputDirectory = dirname($outputFile);

        if (!file_exists($outputDirectory) && !@mkdir($outputDirectory, 0777, true)) {
            return false;
        }

        return is_int($this->getNewSandBox(function () use ($outputFile, $inputFile, $parameters) {
            return file_put_contents($outputFile, $this->renderFile($inputFile, $parameters));
        })->getResult());
    }