Add max retry when upload failed.
Add error handling.
Remove  console.log().
Fix: Don't start monitor if self.monitor is false.