basic function working for dir checksum