fix sort cmd
rm tmp files
add flush cmds
add config cmd