log mongodb errors from the connection. remove unused index