If you run a pice of code and output gets written, then alter the code and run again, you don't know if the output is of the new or old program, if the output does not change.
A simple solution would be to clear the output, when the run button gets pressed.