Change another way to remove temp file.