Dui, ni shuo de dui
Make sure your power cables are well attached on the ramps.
It is possible that the power disconnects briefly, so your arduino shuts off for a very short amount of time, enough to mess up everything. Check all your wiring also for possible short circuits.
Could also be some noise induced by your router motor or your vacuum cleaner, but less likely.
Wait until you can try the SD card before messing up with the USB setup