Added a -q flag to quit any type of sort after finished