override log() function ai background script. wrap service methods in try/catch to avoid service stoppage.