Background job and logging fixes