adding flag for sorting whole directory and default use to sort one file