Improved loading algorithm so that incompatible or corrupted profiles will fail to load