add logging for mongo error and disconnection