Save the detected spikes in the files.