Core: Redirect DebugMessage to log file

Make core debugging easier