added logging
fixed recursive import