# Create a "catch" for closing the window $TK{'pw-'.$NVP{'Id'}}->protocol('WM_DELETE_WINDOW' => [\&CleanUpOnExit, $NVP{'Id'}]);