Adding logging statement when exiting a child process