Running the cmd line tool and saving the output