add line break before eof
little optimize