add max_runtime to detect_lostruns