Added svm data writing