Erro when using Custodian

Hi,
I’m trying to use Custodian to check and correct my vasp calculations. I run the following codes after a vasp calculation. I got a warning that ‘UnboundLocalError: cannot access local variable ‘out_file’ where it is not associated with a value’. However, there is a ‘vasp.out’ file in the working directory. Can anyone tell me how to fix this? Thank you very much.

VASP_RUN_COMMAND = “mpirun -n 32 /nfs/share/vasp.5.4.4_intel_2018/bin/vasp_std > vasp.out”
directory = os.getcwd()
def run_custodian(directory):
directory = os.path.abspath(directory)
os.chdir(directory)
output = os.path.join(directory, “vasp.out”)
vasp_cmd = shlex.split(VASP_RUN_COMMAND)
handlers = [VaspErrorHandler(), UnconvergedErrorHandler(),FrozenJobErrorHandler(),NonConvergingErrorHandler(nionic_steps=10, output_filename=‘OSZICAE’),MeshSymmetryErrorHandler()]
jobs = VaspJob.double_relaxation_run(vasp_cmd=vasp_cmd)
c = Custodian(handlers, jobs, max_errors=10)
c.run()
run_custodian(directory)