public function write($content) { $result = file_put_contents($this->output_file, $content); if (false === $result) { throw new \Exception("Unable to write final output to {$this->output_file}. Check permissions and try again", 1); } return true; }