Was not using mongo database in config file.