Recently released federal records show Homeland Security officials had launched an internal investigation into controversial Border Patrol commander Greg Bovino shortly before he announced his retirement in March.