Fixed error debug output to give better detail