diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index f577e35..f5b2d6b 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -565,54 +565,81 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)		/*{{{*/
 {
    stringstream msg;
 
+   clog << "Ident: entering" << endl;
+
    // Startup
    string CDROM = _config->FindDir("Acquire::cdrom::mount");
    if (CDROM[0] == '.')
       CDROM= SafeGetCWD() + '/' + CDROM;
 
+   clog << "Ident: 1" << endl;
+
    if (log != NULL)
    {
       msg.str("");
       ioprintf(msg, _("Using CD-ROM mount point %s\nMounting CD-ROM\n"),
 		      CDROM.c_str());
       log->Update(msg.str());
+      clog << "Ident: 2" << endl;
    }
 
+   clog << "Ident: 3" << endl;
+
    // Unmount the CD and get the user to put in the one they want
    if (_config->FindB("APT::CDROM::NoMount",false) == false)
    {
+      clog << "Ident: 4" << endl;
       if(log != NULL)
 	 log->Update(_("Unmounting CD-ROM\n"), STEP_UNMOUNT);
+
+      clog << "Ident: 5" << endl;
+
       UnmountCdrom(CDROM);
 
+      clog << "Ident: 6" << endl;
+
       if(log != NULL)
       {
+         clog << "Ident: 7" << endl;
 	 log->Update(_("Waiting for disc...\n"), STEP_WAIT);
+         clog << "Ident: 8" << endl;
 	 if(!log->ChangeCdrom()) {
+            clog << "Ident: 9" << endl;
 	    // user aborted
 	    return false;
 	 }
       }
 
       // Mount the new CDROM
+      clog << "Ident: 10" << endl;
+
       if(log != NULL)
 	 log->Update(_("Mounting CD-ROM...\n"), STEP_MOUNT);
 
+      clog << "Ident: 11" << endl;
+
       if (MountCdrom(CDROM) == false)
 	 return _error->Error("Failed to mount the cdrom.");
    }
 
+   clog << "Ident: 12" << endl;
+
    // Hash the CD to get an ID
    if (log != NULL)
       log->Update(_("Identifying.. "));
    
 
+   clog << "Ident: 13" << endl;
+
    if (IdentCdrom(CDROM,ident) == false)
    {
+      clog << "Ident: 14" << endl;
       ident = "";
       return false;
    }
 
+   clog << "Ident: 15" << endl;
+
    if (log != NULL)
    {
       msg.str("");
@@ -620,31 +647,44 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)		/*{{{*/
       log->Update(msg.str());
    }
 
+   clog << "Ident: 16" << endl;
+
    // Read the database
    Configuration Database;
    string DFile = _config->FindFile("Dir::State::cdroms");
    if (FileExists(DFile) == true)
    {
+      clog << "Ident: 17" << endl;
       if (ReadConfigFile(Database,DFile) == false)
 	 return _error->Error("Unable to read the cdrom database %s",
 			      DFile.c_str());
+      clog << "Ident: 18" << endl;
    }
+   clog << "Ident: 19" << endl;
    if (log != NULL)
    {
+      clog << "Ident: 20" << endl;
       msg.str("");
       ioprintf(msg, _("Stored label: %s\n"),
       Database.Find("CD::"+ident).c_str());
       log->Update(msg.str());
+      clog << "Ident: 21" << endl;
    }
 
+   clog << "Ident: 22" << endl;
+
    // Unmount and finish
    if (_config->FindB("APT::CDROM::NoMount",false) == false)
    {
+      clog << "Ident: 23" << endl;
       if (log != NULL)
 	 log->Update(_("Unmounting CD-ROM...\n"), STEP_LAST);
+      clog << "Ident: 24" << endl;
       UnmountCdrom(CDROM);
+      clog << "Ident: 25" << endl;
    }
 
+   clog << "Ident: 26" << endl;
    return true;
 }
 									/*}}}*/
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index 20c6e88..858f698 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -166,7 +166,9 @@ bool DoAdd(CommandLine &)
    unsigned int count = 0;
    string AptMountPoint = _config->FindDir("Dir::Media::MountPath");
    bool automounted = false;
-   if (AutoDetect && UdevCdroms.Dlopen())
+   clog << "DoAdd: before if()." << endl;
+   if (AutoDetect && UdevCdroms.Dlopen()) {
+      clog << "DoAdd: Begin while loop" << endl;
       while (AutoDetectCdrom(UdevCdroms, count, automounted)) {
 	 if (count == 1) {
 	    // begin loop with res false to detect any success using OR
@@ -186,15 +188,28 @@ bool DoAdd(CommandLine &)
 	 if (_error->empty() == false)
 	    _error->DumpErrors();
       }
+      clog << "DoAdd: End while loop" << endl;
+   } else {
+      clog << "DoAdd: Else branch" << endl;
+   }
 
-   if (count == 0)
+   if (count == 0) {
+      clog << "DoAdd: count == 0, so calling cdrom.Add()" << endl;
       res = cdrom.Add(&log);
+      clog << "DoAdd: back from calling cdrom.Add()" << endl;
+   }
 
-   if (res == false)
+   if (res == false) {
+      clog << "DoAdd: res == false, so calling error handling" << endl;
       _error->Error("%s", _(W_NO_CDROM_FOUND));
-   else
+      clog << "DoAdd: back from error handling" << endl;
+   }
+   else {
+      clog << "DoAdd: Should be good now." << endl;
       cout << _("Repeat this process for the rest of the CDs in your set.") << endl;
+   }
 
+   clog << "DoAdd: return res " << res << endl;
    return res;
 }
 									/*}}}*/
@@ -214,7 +229,9 @@ bool DoIdent(CommandLine &)
    unsigned int count = 0;
    string AptMountPoint = _config->FindDir("Dir::Media::MountPath");
    bool automounted = false;
-   if (AutoDetect && UdevCdroms.Dlopen())
+   clog << "DoIdent: before if()" << endl;
+   if (AutoDetect && UdevCdroms.Dlopen()) {
+      clog << "DoIdent: before while()" << endl;
       while (AutoDetectCdrom(UdevCdroms, count, automounted)) {
 	 if (count == 1) {
 	    // begin loop with res false to detect any success using OR
@@ -234,12 +251,23 @@ bool DoIdent(CommandLine &)
 	 if (_error->empty() == false)
 	    _error->DumpErrors();
       }
+   } else {
+     clog << "DoIdent: else branch" << endl;
+   }
 
-   if (count == 0)
+   if (count == 0) {
+      clog << "DoIdent: count == 0, so calling Ident" << endl;
       res = cdrom.Ident(ident, &log);
+      clog << "DoIdent: back from ident" << endl;
+   }
 
-   if (res == false)
+   if (res == false) {
+      clog << "DoIdent: res == false, calling error handling" << endl;
       _error->Error("%s", _(W_NO_CDROM_FOUND));
+      clog << "DoIdent: back from error handling" << endl;
+   }
+
+   clog << "DoIdent: returning res " << res << endl;
 
    return res;
 }
