refactor dump command and check out new option