https://wiert.me/2021/01/28/delphi-getting-the-name-of-the-current-unit/
Delphi: getting the name of the current unit