Better debug printing, loading of mongodb hostname and port from config file

 - Added better debug print, when config file is load
 - MongoDB hostname and port are read from ini file
 - Better including mongo.h file
 - Small refactoring