Ensured XMLReader is closed once the file is read