clean up main cmd