The missed opportunities to prevent the 2017 terror attacks