Changes from cybutek that weren't in VesselSimulator.
Changes from cybutek that weren't in VesselSimulator.

--- a/CelestialBodies.cs
+++ b/CelestialBodies.cs
@@ -37,7 +37,8 @@
             try
             {
                 SystemBody = new BodyInfo(PSystemManager.Instance.localBodies.Find(b => b.referenceBody == null || b.referenceBody == b));
-                if (!SetSelectedBody("Kerbin"))
+                String homeCBName = Planetarium.fetch.Home.bodyName;
+                if (!SetSelectedBody(homeCBName))
                 {
                     SelectedBody = SystemBody;
                     SelectedBody.SetSelected(true);

file:a/LogMsg.cs -> file:b/LogMsg.cs
--- a/LogMsg.cs
+++ b/LogMsg.cs
@@ -1,6 +1,4 @@
-using System.Text;
-
-using UnityEngine;
+using System.Text;
 
 namespace KerbalEngineer
 {
@@ -15,7 +13,10 @@
 
         public void Flush()
         {
-            MonoBehaviour.print(this.buf);
+            if (this.buf.Length > 0)
+            {
+                Logger.Log(this.buf);
+            }
             this.buf.Length = 0;
         }
     }

file:a/Logger.cs -> file:b/Logger.cs
--- a/Logger.cs
+++ b/Logger.cs
@@ -19,31 +19,30 @@
 
 #region Using Directives
 
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-using System.Reflection;
-
-using UnityEngine;
-
 #endregion
 
 namespace KerbalEngineer
 {
+    using System;
+    using System.Collections;
+    using System.Collections.Generic;
+    using System.IO;
+    using System.Reflection;
+    using UnityEngine;
+
     [KSPAddon(KSPAddon.Startup.Instantly, false)]
     public class Logger : MonoBehaviour
     {
+        #region Fields
+
+        private static readonly List<string[]> messages = new List<string[]>();
+
+        #endregion
+
         #region Constants
 
         private static readonly string fileName;
         private static readonly AssemblyName assemblyName;
-
-        #endregion
-
-        #region Fields
-
-        private static readonly List<string[]> messages = new List<string[]>();
 
         #endregion
 
@@ -86,50 +85,58 @@
             {
                 try
                 {
-                    if (obj is IEnumerable)
+                    messages.Add(new[] {"Log " + DateTime.Now.TimeOfDay, GetObjString(obj)});
+                }
+                catch (Exception ex)
+                {
+                    Exception(ex);
+                }
+            }
+        }
+
+        public static void Log(string name, object obj)
+        {
+            lock (messages)
+            {
+                try
+                {
+                    messages.Add(new[] {"Log " + DateTime.Now.TimeOfDay, name + "\n" + GetObjString(obj)});
+                }
+                catch (Exception ex)
+                {
+                    Exception(ex);
+                }
+            }
+        }
+
+        private static string GetObjString(object obj, int tabs = 0)
+        {
+            string objString;
+            string tabString = string.Empty;
+            for (int i = 0; i < tabs; i++)
+            {
+                tabString += " ";
+            }
+
+            if (obj != null)
+            {
+                objString = tabString + obj;
+
+                IEnumerable items = obj as IEnumerable;
+                if (items != null)
+                {
+                    foreach (object item in items)
                     {
-                        messages.Add(new[] {"Log " + DateTime.Now.TimeOfDay, obj.ToString()});
-                        foreach (var o in obj as IEnumerable)
-                        {
-                            messages.Add(new[] {"\t", o.ToString()});
-                        }
+                        objString += "\n" + GetObjString(item, tabs + 1);
                     }
-                    else
-                    {
-                        messages.Add(new[] {"Log " + DateTime.Now.TimeOfDay, obj.ToString()});
-                    }
-                }
-                catch (Exception ex)
-                {
-                    Exception(ex);
-                }
-            }
-        }
-
-        public static void Log(string name, object obj)
-        {
-            lock (messages)
-            {
-                try
-                {
-                    if (obj is IEnumerable)
-                    {
-                        messages.Add(new[] {"Log " + DateTime.Now.TimeOfDay, name});
-                        foreach (var o in obj as IEnumerable)
-                        {
-                            messages.Add(new[] {"\t", o.ToString()});
-                        }
-                    }
-                    else
-                    {
-                        messages.Add(new[] {"Log " + DateTime.Now.TimeOfDay, obj.ToString()});
-                    }
-                }
-                catch (Exception ex)
-                {
-                    Exception(ex);
-                }
-            }
+                }
+            }
+            else
+            {
+                objString = "Null";
+            }
+
+            return objString;
         }
 
         public static void Log(string message)
@@ -186,9 +193,9 @@
             {
                 if (messages.Count > 0)
                 {
-                    using (var file = File.AppendText(fileName))
+                    using (StreamWriter file = File.AppendText(fileName))
                     {
-                        foreach (var message in messages)
+                        foreach (string[] message in messages)
                         {
                             file.WriteLine(message.Length > 0 ? message.Length > 1 ? "[" + message[0] + "]: " + message[1] : message[0] : string.Empty);
                             if (message.Length > 0)