fixed read_last_line