Fix temp file remove