Added a method for clients to explicitly be able to close the index file. In case only the header was needed
Close index file after use