fix logging
add debugging lines