/// <summary>
        /// Scaffold Loom project
        /// </summary>
        /// <param name="project"></param>
        private static void AutoInit(LoomProject project)
        {
            string[] files = Directory.GetFiles(project.Directory);
            if (!(files.Length == 1 && Path.GetExtension(files[0]) == ".lsproj"
                && Directory.GetDirectories(project.Directory).Length == 0)) return;

            if (!project.Storage.ContainsKey("package"))
                return;

            string pkg = project.Storage["package"] as String;
            project.Storage.Remove("package");
            project.Save();
            
            string loomPath = ResolveLoom();
            string loom = Path.Combine(loomPath, "loom.bat");
            if (!File.Exists(loom))
            {
                ShowMissingLoomBatError();
                return;
            }

            string oldWD = PluginBase.MainForm.WorkingDirectory;
            string cmd = loom + ";new --force";
            if (!string.IsNullOrEmpty(pkg)) cmd += " --app-id " + pkg;
            cmd += " \"" + Path.GetFileName(project.Directory) + "\"";

            PluginBase.MainForm.WorkingDirectory = Path.GetDirectoryName(project.Directory);
            PluginBase.MainForm.CallCommand("RunProcessCaptured", cmd);
            PluginBase.MainForm.WorkingDirectory = oldWD;

            // force re-exploring the project
            updater.Enabled = true;
        }