use file to cache

using file to cache dictionary which make it runs faster