I added processing logs of terminating application, with this code it will look not a simple.