Offload cloud communication to a separate thread