Add a function to close streams and more to read file's contents.