Convert endl to \n