private void waitForQueue() throws InterruptedException {
   synchronized (filesToResolve) {
     filesToResolve.wait(1000);
   }
 }