Black box, self-patching system