set chan [file tempfile filenameVar]