public function __destruct()
 {
     if ($this->modified) {
         $this->saveToFile();
     }
     parent::__destruct();
 }