fix retry
remove temp file