bugfix: prevent monitor exception spin loop when MongoDB unreachable.

Hi Deftlabs!

Currently with the `sleep` occurs after the MongoDB calls, the background threads will sit in a verbose exception loop while the MongoDB is down. This change ensures the sleep occurs on exception, but still eagerly attempts the cleanup at startup.

Thanks!
@john-morales