+      while( (!inFile.is_open()) && inFiles.size() > 0 ) {
+       bool excludethisfile=false;
+
+       openFileDesc = inFiles.back();
+
+       if (excludefiles != NULL)
+         for (vector<string>::iterator exit = excludefiles->begin(); exit != excludefiles->end(); ++exit)
+           if ( *exit == inFiles.back().filename ) {
+             excludethisfile = true;
+             break;
+           }
+             
+       if ( ! excludethisfile ) {
+         if(out) *out->log << "CCACHE: Opening dat-file: " << inFiles.back().filename << endl << flush;
+         inFile.open( (DATADIR + "/" + inFiles.back().filename).c_str(), std::ios::binary );
+       }
+       else
+         if(out) *out->log << "CCACHE: Excluded dat-file: " << inFiles.back().filename << endl << flush;
+       
+       inFiles.pop_back();
+       
+       if( !inFile.is_open() ) continue;
+
+       inBuffer = new boost::iostreams::filtering_istreambuf;
+       inBuffer->push( boost::iostreams::bzip2_decompressor() );
+       inBuffer->push(inFile);
+      }