line-by-line output and check whether machine is running