Hmmm, I did't check the current line is blank or not, I check next line.So. if line: conditional don't work..
But you remind me. if out_line.strip() == "": I think I  can make a little change, thanks a lot.