Fix WriteString overwrites existing lines

Swape i/j
Merge pull request #1 from jfreax/fix-writestring

Fix WriteString overwrites existing lines