Added mock code to write waveforms in the files.