save file to tmp location