Handle mongo startup correctly