Added options for --dbname and --primary