improve output subcommand
prepare dump subcommand
add dump subcommand