File writer try to write txt file //error writing file