all hash keys should be defined, or the output struture will shift
sort files in dir