https://github.com/brandonlind/pythonimports/blob/b7f5c94c5c593a605bce48428a49c091960c1198/myslurm.py#L895 If an outfile is edited, then pythonimports.getmostrecent will return the incorrect outfile for a particular job. Maybe sort by jobid?