To prevent roof failure, use high quality roofing materials, ensure proper installation, install a good attic ventilation system, and use flashings to waterproof your chimney and skylights.