Then, you can replace the loop here with a call to readAttrsList("file")