XD-927: Use ModuleType enum everywhere
XD-958 Fixing path for tmp directory