added pretty json in debug error