Add item of structure to use callback function.
Change posion of expected variable.
Add process to kill and close child process.