Fixed exception when running a background task.
Changed console stack traces to use CRLF line endings.