fix bug and add mongodb config params