protected function removeTmpFiles($id)
    {
        if (isset($this->tmpFiles[$id])) {
            foreach ($this->tmpFiles[$id] as $tmpFile) {
                if (file_exists($tmpFile)) {
                    if (is_dir($tmpFile)) {
                        rmdir($tmpFile);       
                    } else {
                        unlink($tmpFile);
                    }
                }
            }
            
            unset($this->tmpFiles[$id]);
        }
        
        return $this;
    }