Changed isInitialized to isTrained, and created a new dataset if the file does not exist.