cleanup, making sure some file input streams are closed.