This closefile[n] function will close the file represented by handle n
var f:=openfile["myfile.txt","r"]; closefile[f];