add wait for child process