Get last term of log