Avoids writing blank line when there are no comments