Better flushing
Fixing success from shell-command