added logging to some stuff