Added a readCapList function to read the list of caps