fixed fce0489: foreground not calling the callback when receiving resources from foreground
commenting out console.log