Sorting awk array output?

Maybe. You really need refactoring.

On split. It should work as you want. But with spaces in the names of files you can not expect than your filename would be always in $9 in awk. For example with one space the first part before the space will be in $9 and the second - in $10.

That is (ofcourse) correct..
And Futher on in the script I am sorting that out.. I am currently busy on recoding that part so it will work..