Add better error reporting for child process