save the input to temporary file and open the file