Add option to automatically sort the file after an operation.