logging.warn('Found %s at %s' % (what, fd))
 
     def handleproblem(what, fd, fp):
-        if todelete(fd):
+        if toignore(fd):
+            logging.info('Ignoring %s at %s' % (what, fd))
+        elif todelete(fd):
             removeproblem(what, fd, fp)
         else:
             logging.error('Found %s at %s' % (what, fd))
             fp = os.path.join(r, curfile)
             fd = fp[len(build_dir) + 1:]
 
-            # Check if this file has been explicitly excluded from scanning
-            if toignore(fd):
-                continue
-
             try:
                 mime = magic.from_file(fp, mime=True) if ms is None else ms.file(fp)
             except UnicodeError: