public function __destruct() { if (is_resource($this->filePointer)) { $this->writeLocationTable(); fclose($this->filePointer); } }