It saves the files at the same location. There is the "leading" method (removeSimilarClassesFromFile1) that first read the complete File (and close it) then it performce the actions and last it invokes removeSim...Files(List<String> ...) that overrides the File with the new content. 
Is that ok?