Defrag on shutdown

Shutdown after defrag works great.

Can you add the option for Defraggler to wait if something is running (say, a scheduled antivirus scan) before shutting down?

Thanks!