added a way to close the demo input stream