Added some more echo statements to explain what's going on better.