Fix a NPE when run the swoosh algorithm when store on disk option is on