public function __destruct() { if ($this->output) { fclose($this->output); } if ($this->error) { fclose($this->error); } }