change java thread to async task to upload logs