Added updated write line and write string functions.