Localize variable writeText

Hey, not sure if writeText was supposed to be global or I'm just oblivious to something, but I thought that this variable should be local because it doesn't really have use outside of this file. Again, sorry if I'm wrong! :)