Fix: Log output lines are duplicated

* lastlines param should only be used once offset is available
Remove System.println