Changed error template
added mongoose connection