Handle query errors while waiting for the IP address.
Improve the `scp` command. Wait for commands to finish.

Wait for both the `scp_file` and `root_cmd` Popen processes to terminate before returning. Show `stdout` and `stderr` at least in the logs so we know what's going on.