Added writeString() and writeFile() methods.