update to add get last logs function