How Sonic Pi upload Midi Files From My Computer?

Glad you fixed the overlap issues. As regards changing the Sonic Pi program and then having to use run or stop and run, I am afraid this is necessary, as you are only changing a text buffer contents when you alter the running program, and Sonic Pi has no means of knowing this until you press run and it reruns the entire buffer.
This problem has been discussed in a recent thread here which you may find useful.