Rewrote message logging to support ANSI terminal color output codes