Use cmd.run instead of cmd.wait.