防患於未然

Idiom

 * 1) to take preventative measures before a disaster occurs; to prevent trouble before it happens