fix deprecation warnings; add debug info