German foreign minister admits failures in Afghanistan crisis