slight cleanup; warning on Mongo connection failure

Nothing crazy, but functionally we at least get an error message if the connection to MongoDB doesn't work. I also have a temporary variable dev for whether we're in development, to simplify some of the logging options, etc.