public function saveIfRequired($suffix)
{
//saves previuos changes if there are any commands specified
if (count($this->convertCommandOptions)) {
$this->setTmpPaths($this, $suffix);
$this->save($this->getOutputPath());
$this->imagePath = $this->getOutputPath();
$this->tmpFiles[] = $this->getOutputPath();
}
return $this;
}