How to program using USBASP and keep bootloader

dc42:
Atmel recommends that you always reset the watchdog before disabling it. Possibly the wdt_disable function does this already, but try inserting a call to wdt_reset before the call to wdt_disable, in case it doesn't.

Still no luck even if I did that, thank you anyway.