cleanup after the child process