found a bunch of potential unhandled errors and handled them
Merge pull request #474 from ironbane/promiseleaks

found a bunch of potential unhandled errors and handled them