minor fixes for imports; better debug output