Added --missing and --sort options