If running in Debug mode - messages to terminal, else to Log file
Documentation
Merge conflict - fixed