Change WP_CLI::line() to WP_CLI::log(), since line is not really "real time" as of newer versions of wp-cli, but log is. Prevents things from going out of order, and gives more immediate feedback during long-running scripts (larger databases / lots of files / etc)