close mongoose connection when process exit