Add max retry when upload failed.
Add error handling.
Remove  console.log().
Fix: Don't start monitor if self.monitor is false.
Merge pull request #1 from hereblur/master

Improve error handing.