introduce and use File_system.with_tmp_file