Hi Razdan,
You can try a different logic while running in background –
For instance try to upload the file in application server using CG3Z. And write a separate logic to access the file from application server instead of desktop , while running in background.