Handle error in child process