fix #2, then print more debug info