Fixed background error logging