US plagued by doubts as it exits Afghan war