protected function saveFinishFile()
{
$command = implode(' ', [$this->binaryPath, $this->mountCommandOptions(), $this->mountScriptForExport(), $this->prefixOsPath($this->htmlBodyPath), $this->getFullPath()]);
$process = new Process($command, $this->getPath());
$process->setTimeout($this->timeout);
$process->run();
if ($errorOutput = $process->getErrorOutput()) {
throw new RuntimeException('PhantomJS: ' . $errorOutput);
}
// Remove temporary html file
@unlink($this->htmlBodyPath);
return $this->getFullPath();
}