Add wait method for mongodb service