remove extra delimiter at line end