CLDIDE-2164 Reworked performing of action before application closing