Added a logger, mostly lifted from ClassiCubeLauncher.
Replaced Throwable.printStackTrace() with logger calls.