tmpfile API change