Add a method to determine whether there is a tmp file.
Merge branch 'path' into stats
Improve stability.