corrected newline not written