Move ensure-mongo-connection to the correct place