added some debug info and small import fix