25Khz PWM with digitalWrite...

Have fun digging into the 32U4 datasheet. You'll see that the timer/counters are different than with the 328P. If you need the delay() function, you'll need to find which timer/counter is being used on 32U4, then select another timer/counter to use, while adjusting its mode and frequency for 25KHz PWM.

Might be quicker to just use a Pro Mini instead, then use the sample code in link provided by teryking228.