def float_string(s, verbose=True):
    """Try parsing a string as float, fixing errors if the string is #.######-### (e.g. not #.######E-###, missing E). Return the correct string."""
    try:
        float(s)
    except ValueError:
        x = s.split('-')
        new_s = ''.join(x[:-1]) + 'E-' + x[-1]
        if verbose:
            print('Fixing vasprun: {} to {}'.format(s, new_s))
        s = new_s

    return s