Fixed bug in the usage of writeStimFiles.