Change order of looking up the file modify time and cleaning up the file to
help deal a race condition for duplex cases where files are cleaned up before
the modify time is determined.