Separated saving into a different loop
Fixed delay problem with plotting spikes