Fix a bug in status report
Improve the error handling when pulling entries form MongoDB

1. Add/Improve the error messages, though many of them are still vague.
2. Deal with more corner cases.