You are definately correct on this. For "have written" to be correct the second clause would need to be in the present tense. "As I have written earlier, we are all doomed" is ok. The past perfect...