store pairs in file