Add option to dump to file