Issue #98 : 1. upload pending events when launched 2. fix the unable to send http request in the background issue 3. small bug fixing and added some logs