small bug fixing when working with boost. Need to add a newline char everyline, and cannot call writeUTF, need to getBytes first