remove unused whitespace in file selector and sort files by name