Adding query to check for main module existence.