Sort the log dirs