change check logic of gather_logs