Use mongo fork instead of using mongod &. Fork ensures that running continues
even when the terminal is closed.