Origin of writing and making witnesses
107) Narrated Abu Huraira Allah's Messenger said: When Allah created Adam and breathed soul into him, he sneezed. He said: Praise be to Allah, by His permission. At this his Lord said to him: Your Lord has bestowed mercy on you. 0 Adam! Go to those angels sitting there and greet them. So Adam said:(peace be upon you). They responded to him. On you too the same and Allah's mercy Then he came back to his Lord. Allah said: It will be your greeting and the greeting of your offsprings. Allah said having made His Hands closed: Select anyone of them. Adam said: I select the right hand and both the hands of my Lord are right and blessed. Then Allah spread it. There was Adam and his generation. Adam asked: 0 Lord! Who are these people? Allah said: They are your children. Every human being's life is written between his eyes. Among them was a man with the brightest face. For him was written only forty years of age. Adam said: 0 Lord! Who is this fellow? Allah said: This is your son Da'ud (David). His life span is written forty years. Adam said: 0 Lord! Increase his age. Allah said: This is what I have written down for him. He said: Then I give him sixty years of my age. Allah said: This is between you and him. Live in Paradise. He lived there as long as Allah wished. Then he was descended from it to earth. Adam was counting his age. Then the death angel came to him. Adam said to him: You have come earlier. For me, one thousand years have been written. The angel said: Yes, but out of them you have given sixty years to your son Da'ud. Adam denied that so his successors also denied. He forgot, so his successors also forgot. From that day, Allah ordered writing down and making witnesses (for pledges).
(This Hadith is sound and reported by Ibn Abi Asim, Ibn Hibban and Hakim in his Mustadrak).
This Hadith teaches us that one should write down his debts, loans to others and his pledges, because he may die any minute or may get into conflict with the second party. Unless there are witnesses and something written, his rights will not be proved. This will affect his life as well as that of his heirs.