dump to file using pickle