fix for infinite restart bug caused by File::stat dieing on temp files we already deleted