make sure to close the tokenstream, even if an exception is raised down
below
rev 1.2.7