Investigations spanning from west Africa to Europe to the Middle East have been trying to piece together the would-be bomber 's whereabouts and actions leading up to the Christmas Day attack , foiled when the explosives failed to detonate properly .