Every time i have written something to flash it had erased the previous contents. Therefore i would suggest copying current flash contents to a TFTP server, erasing flash and then copying both old contents and QDM to the flash from TFTP server.
I don't have experience installing QDM though, so i would suggest checking out installation guide.