updated to have better output on schema failure