This sentence? It's perfectly normal.
Блин, почему?

I thought -- past tense, If we replaced it with
"I think you wrote" -- it'd be fine, right?
And if I thought you wrote, it must be I thought you had written?

Because if an action in the past occured after another action in the past, the latter must be past perfect and the former must be in past simple. Kind of. Right? Sequence of tenses.

"Hardly had he entered the room, he heard someone's voice"
Не так же:
Hardly he entered the room, he heard someone's voice".