Beefed up console ui and added log file for debug builds.