Add real-time logging when running subprocess.Popen() and clean up installation