FIX: delete logs only if lastID is not None