Agencies failed to grasp pre-Sept. 11 terrorist threat, lawmakers find