tweaking to remove log info and retain newlines