Add command-line options and sort partitions for better file locality.