Change behavior

if all line is empty, ignore it, and do not append an \n.