let inspect entry =
  dprintf 5 "Doing sanity checks";
  let evil = ref false in
  match Hygiene.check
    ?sanitize:
      begin
        if !Options.sanitize then
          Some(Pathname.concat !Options.build_dir !Options.sanitization_script)
        else
          None
      end
      laws entry
  with
  | [] -> ()
  | stuff ->
    List.iter
      begin fun (law, msgs) ->
        Printf.printf "%s: %s:\n"
          (match law.law_penalty with
           | Warn -> "Warning"
           | Fail ->
               if not !evil then
                 begin
                   Printf.printf "IMPORTANT: I cannot work with leftover compiled files.\n%!";
                   evil := true
                 end;
              "ERROR")
          law.law_name;
        List.iter
          begin fun msg ->
            Printf.printf "  %s\n" msg
          end
          msgs
      end
      stuff;
    if !evil then raise Exit_hygiene_failed;