def scan_runtime(step, fname):
    """ Find runtime of VPR log (if any), else returns empty str. """
    try:
        with open(fname, 'r') as f:
            step_runtime = 0
            total_runtime = 0
            for line in f:
                if line.startswith("# {} took".format(step)):
                    step_runtime = float(line.split()[3])

                if line.startswith('The entire flow of VPR took'):
                    total_runtime = float(line.split()[6])

            step_overhead = total_runtime - step_runtime

            return str(step_runtime), str(step_overhead)
    except FileNotFoundError:
        return ""