Added "\n" to each write