add test code, dump the dict to file