...                log.write(f"[FAIL] {rel} {err}\n")

        log.write(f"[DONE] ok={processed} failed={failed} total={len(extract_files)}\n")

    print(f"FERTIG Phase3: ok={processed} failed={failed} total={len(extract_files)}")
    print(f"Output: {results_path}")
    print(f"Index:  {index_path}")
    print(f"Log:    {log_path}")
    print(f"Fails:  {fails_dir}")

if __name__ == "__main__":
    main(...