Modify to use compacted file