I looking for code, to write variables to a file, in the way descripbed above