Added some debugging output for background processing