Your user firmware might be interfering with the flashing process. Personally I find DFU flashing much more preferable since it’s a lot more reliable, as well as giving better error outputs.
I am not sure why the cli stopped flashing, I ended up using OTA yesterday to upload a couple more changes to my little test code. It would not be so frustrating if the cli at least gave a useful message to explain why it the flash process was terminated. A remark like “undefined” has no meaning to me and does not help me find the issue.
To use DFU you need to put your device in DFU mode, and issue particle flash --usb firmware.bin using the CLI. You’ll need to have DFU-Util installed properly though (which should be done for you when using the Windows installer).