catch error of child process