Added async query variable to importing files by reference. Also fixed query variable checking for some classes.
Refactored storing catalog entries to remove open and write of catalog file on every catalog entry.