fixed to take any lookup file, new flag system, see readme comment