add resume function when do analysing
remove temp file ref