[BACKPORT] remove unused creating temp file.