private function loadModuleFile($installPath)
    {
        if (!file_exists($installPath)) {
            throw FileNotFoundException::forPath($installPath);
        }

        if (!is_dir($installPath)) {
            throw new NoDirectoryException(sprintf(
                'The path %s is a file. Expected a directory.',
                $installPath
            ));
        }

        try {
            return $this->jsonStorage->loadModuleFile($installPath.'/puli.json');
        } catch (FileNotFoundException $e) {
            // Modules without module files are ok
            return null;
        }
    }