Handle child process errors gracefully