print error and exit if mongoose fail to start