有则改之,无则加勉

yǒu zé gǎi zhī , wú zé jiā miǎn

correct any mistakes you made, but maintain your good record if you did not make them (idiom)

yǒu

to have; there is

(literary) (conjunction used to express contrast with a previous clause) but; then

gǎi

to change

zhī

(possessive particle, literary equivalent of 的[de5])

,

not to have

(literary) (conjunction used to express contrast with a previous clause) but; then

jiā

to add

miǎn

to exhort