cmd: Check for CloseHandle failure.