some small improvements, HashMap is used to maintain file lists.