handle empty lists as args to build_dict functions
pickle dicts to avoid data loss upon premature termination