move command to done before printing message
fix bug when preRun is failing