public void Write(string name, string output) { try { html.Open(output + ".html"); js.Open(output + ".js"); html.Put(html.body); html.Put(name); js.Put(js.header); WriteBody(it); WriteLayout(it); html.Close(); js.Close(); } catch (Exception exception) { html.Delete(); js.Delete(); Console.Out.WriteLine(exception.Message + "\nStack Trace:\n" + exception.StackTrace); } finally { html.Dispose(); js.Dispose(); } }