validation and writing file
writing in file