last_line should be global

Signed-off-by: Du, Changbin <changbin.du@gmail.com>