The scientists keep failing to find the very first writing system, trying to treat scratches as runes or pictograms.
That's because there were no runes or pictograms.
Based on the low-style speech, the closest to the wild nature, the first writing system were hieroglyphs.
There was less than ten of them, all obscene.
Their combination made it possible to express 90% of the spoken ideas, and if something stays unclear, explain with a picture.
Thus, the writing has evolved from the wild ape obscene gesture language, so humans were able to write before they had started speaking.
Btw, this explains the handprints on the cave walls. It's a chat.
(midfinger emoji is replaced by wordfilter)