memoization used to avoid calculating checksums repeatedly for same files