modified tmp file usage