replaced FileWriter by FileWriter2