Use System.Diagnostics.Debug instead of Console. Opens debug.log on program exit.