public function initFile()
    {
        
    	if ($this->maxFileSize > 0 && file_exists($this->filename) && filesize($this->filename) >= $this->maxFileSize) {
	    	
	    	if ($this->compression == self::COMPRESSION_ZIP) {
	    		$zip = new ZipArchive;
				$res = $zip->open($this->getAvailableArchiveFileName(), ZipArchive::CREATE);
				if ($res === true) {
				    $zip->addFile($this->filename, basename($this->filename));
				    $zip->close();
				    unlink($this->filename);
				} else {
					//fail silently
					return false;
				}	
	    	} elseif ($this->compression == self::COMPRESSION_NONE) {
	    		$success = rename($this->filename, $this->getAvailableArchiveFileName());
	    		if (!$success) {
					//fail silently
					return false;
	    		}
	    	} else {
				//fail silently
				return false;
	    	}
    	}
    	$this->filehandle = @fopen($this->filename, 'a');
        

    }